Artifacts Associated With Ticket 1363452
Ticket change [ba3b33f06f] (rid 129290) by nyademo on 2005-11-22 06:15:58:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Windows2000/ActiveTcl8.4.11 test ========================================= set b1 \u3042\u3044 set b2 [encoding convertto unicode $b1] binary scan $b1 H* result1;# 4244 binary scan $b2 H* result2;# 42304430 if {$result1 ne $result2} {error error} maybe is result2 value right? It seems to me that each second bytes was lost. - foundin initialized to: "obsolete: 8.4.11"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nyademo"
- subsystem initialized to: "12. ByteArray Object"
- title initialized to: "binary scan unicode error"
- type initialized to: "Bug"
Ticket change [4293adcd5a] (rid 116408) by dkf on 2005-11-29 20:15:15:
- icomment:
Logged In: YES user_id=79902 That's exactly the way it is defined to work, using just the low byte from each character. The [encoding convertto] just transforms the characters into a sequence of bytes (with each resulting byte encoded in a single character in the range \u0000-\u00ff) which are then handled in the way you describe. The key point is that Tcl is using a different interpretation of bytes and (especially) characters to what you expected. Keeping bug open while I consider if a documentation update is needed.
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- username: "dkf"
- icomment:
Ticket change [05719ca29d] (rid 89067) by dkf on 2005-12-16 18:10:38:
- closedate changed to: "2005-12-16T11:10:38"
- closer changed to: "dkf"
- status changed to: "Closed"