Overview
| Artifact ID: | 76434c37f660dd2250500f6843ccf10f80a403de |
|---|---|
| Ticket: | 584603ffffffffffffffffffffffffffffffffff
'encoding convertfrom' causes error messages |
| User & Date: | andreas_kupries on 2002-07-24 23:22:31 |
Changes
- icomment:
Logged In: YES user_id=75003 Yes, the result is not valid utf-8. AFAIK [encoding convertfrom identity] is the only command/argument combo which is able to do this. With regard to generation of a byte-array ... The code of [encoding convertfrom] invokes "Tcl_ExternalToUtfDString". This means that the caller has not enough information to be able to decide if the generated DString is valid utf-8 or not, thus unable to decide whether to generate a string or a bytearray object. AFAIK [encoding convertfrom (identity)] is used in the testsuite to thoroughly test the encoding/utf-8 system. Outside of this I currently see no application for the identity encoding. Regarding TclObj / UTF-8 ... Jeff told me yesterday that we have nearly true UTF-8, with the exception of embedded \0's. Regarding Tcl_Main: IMHO we at least have to tell the user when a result could not be printed due to invalid utf-8 ... Invalid utf-8 should not happen in 99.999% of cases, only with [enc cf ident] as said above.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"