Overview
| Artifact ID: | 94a08270f214fb02be8b6cef6f3dec3e2213e4c55feda1f655291f4659b9a816 |
|---|---|
| Ticket: | 885c86a9a0c537862e5895379d454e652a55324b
convertfrom utf8 breaks for 4 byte utf encodings |
| User & Date: | jan.nijtmans on 2023-02-15 11:35:12 |
Changes
- assignee changed to: "jan.nijtmans"
- icomment:
Here, \xf0\x80\x80\x80 is an illegal overlong sequence, so it's split into its bytes. Compare this with Tcl 8.6: <pre> % package require Tcl 8.6.13 % codepoints [encoding convertfrom utf-8 \xf0\x80\x80\x80] U+0000F0 U+000080 U+000080 U+000080 </pre> But now TIP #389 should take it's role, which describes the fallback to cp1252. Therefore, the actual answer should be: U+0000F0 U+0020AC U+0020AC U+0020AC (since byte 0x80 is the euro-sign in cp1252) Not high prio to fix, since it's an illegal byte sequence anyway. When using -strict it throws an exception: <pre> $ tclsh8.7 % encoding convertfrom -strict utf-8 \xf0\x80\x80\x80 unexpected byte sequence starting at index 0: '\xF0' </pre>
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"