Overview
| Artifact ID: | 03537ee02f9570a98d920a54e31ce35d39cf15d9 |
|---|---|
| Ticket: | 411825ffffffffffffffffffffffffffffffffff
Passing list w/UTF-8 from C can fail |
| User & Date: | dgp on 2003-08-28 06:39:06 |
Changes
- icomment:
Logged In: YES user_id=80530 Let me advise you try again tomorrow. By then the anonymous CVS at SF will have caught up to all my commits. the output you describe sounds correct to me. Before you file another bug report, be sure you understand that Tcl uses UTF-8 encoding internally and by default converts to your system encoding on output. The two byte sequence \302\240 is the UTF-8 encoding for the character known in Tcl-Unicode notation as \u00a0 which is the non-breaking space. When you write that character to output on a system with system encoding of iso8859-1 it gets written as the single byte \240 which is the same character in that encoding. Likewise, if you were to read in the byte \240 on the same system, Tcl will convert it back to UTF-8 so by the time Tcl sees it again, it will be the 2-byte sequence \302\240 . When you work with an interactive tclsh, the results you see have actually been written to stdout, and are in the system encoding. If you don't completely follow what I just said, do not file another bug report yet, but let's find another channel to straighten out any misunderstandings about how Tcl encodings are supposed to work.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"