<i>convertfrom utf8 breaks for 4 byte utf encodings</i> status still Open with 4 other changes
by
.
D 2023-02-15T11:35:12.571
J assignee jan.nijtmans
J icomment Here,\s\\xf0\\x80\\x80\\x80\sis\san\sillegal\soverlong\ssequence,\sso\sit's\ssplit\sinto\sits\sbytes.\sCompare\sthis\swith\sTcl\s8.6:\r\n<pre>\r\n%\spackage\srequire\sTcl\r\n8.6.13\r\n%\scodepoints\s[encoding\sconvertfrom\sutf-8\s\\xf0\\x80\\x80\\x80]\r\nU+0000F0\sU+000080\sU+000080\sU+000080\r\n</pre>\r\n\r\nBut\snow\sTIP\s#389\sshould\stake\sit's\srole,\swhich\sdescribes\sthe\sfallback\sto\scp1252.\sTherefore,\sthe\sactual\sanswer\sshould\sbe:\sU+0000F0\sU+0020AC\sU+0020AC\sU+0020AC\s(since\sbyte\s0x80\sis\sthe\seuro-sign\sin\scp1252)\r\n\r\nNot\shigh\sprio\sto\sfix,\ssince\sit's\san\sillegal\sbyte\ssequence\sanyway.\sWhen\susing\s-strict\sit\sthrows\san\sexception:\r\n<pre>\r\n$\stclsh8.7\r\n%\sencoding\sconvertfrom\s-strict\sutf-8\s\\xf0\\x80\\x80\\x80\r\nunexpected\sbyte\ssequence\sstarting\sat\sindex\s0:\s'\\xF0'\r\n</pre>
J login jan.nijtmans
J mimetype text/x-fossil-wiki
K 885c86a9a0c537862e5895379d454e652a55324b
U jan.nijtmans
Z d2f6424c3ccc1555d706f486e443ced4