Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2023-02-16
21:52 • Closed ticket [33ab6d08eb]: Inconsistent behavior with encoding convertfrom -fai... artifact: cb0341be5d user: jan.nijtmans
20:57
Fix [33ab6d08eb]: Inconsistent behavior with encoding convertfrom -failindex check-in: c9a3653986 user: jan.nijtmans tags: core-8-branch
2023-02-15
20:26
Fix for [33ab6d08eb]: Inconsistent behavior with encoding convertfrom -failindex closed check-in: e13da3659a user: jan.nijtmans tags: bug-33ab6d08eb
2023-02-06
21:27 • Ticket [33ab6d08eb] Inconsistent behavior with encoding convertfrom -failindex</... artifact: f2a5dc54d0 user: jan.nijtmans
17:17 • New ticket [33ab6d08eb]. artifact: d313f61052 user: apnadkarni

Inconsistent behavior with encoding convertfrom -failindex

Closed / Fixed33ab6d08ebdc0b422d26c59211168648138885faCreated 4 years agoUpdated 4 years ago
Descriptionplain2023-02-06 17:17:42
The -failindex option seems to behave differently depending on the nature of the invalid byte sequence.

```
%  encoding convertfrom -failindex idx utf-8 A\xC2
A
% set idx
1
%  encoding convertfrom -failindex idx utf-8 A\xC2B
AÂB
% set idx
-1
```

Both are invalid utf-8 byte sequences. In the first case, it detects the error, in the second case it does not.

/Ashok
Referenced by2
  • c9a3653986Fix [33ab6d08eb]: Inconsistent behavior with encoding convertfrom -failindex check-in2023-02-16 20:57:47
  • e13da3659aFix for [33ab6d08eb]: Inconsistent behavior with encoding convertfrom -failindex check-in2023-02-15 20:26:10
jan.nijtmanswiki2023-02-06 21:27:59

Looks like a little detail in the utf-8 decoder needs a fix

jan.nijtmanswiki2023-02-16 21:52:33

Fixed [here]

Log in (anonymous is fine) to add a comment.