<i>UTF-LE32 encoder mapping of surrogates</i> status still Open with 4 other changes
by
.
D 2023-02-06T21:18:25.358
J assignee jan.nijtmans
J icomment This\shappens\sbecause\sof\sthe\scombining\sbehavior\sof\sTcl_UniCharToUtf(),\swhich\sTcl\s9.0\sdoesn't\sdo\sany\smore\sby\sdefault.\sEasy\sto\sfix.\sWill\sdo.\r\n\r\nYou\swill\srealize\sthat\sthis\sis\sinvalid\sUTF-32.\sWhen\sTcl_UniCharToUtf()\sreceives\san\supper\ssurrogate,\sit\swill\soutput\sthe\sfirst\sbyte\sof\sthe\s4-byte\sUTF-8\sencoding\s(which\sis\s0xF0,\sin\sthis\scase).\sFeeding\sTcl_UniCharToUtf()\sa\slower\ssurrogate\swill\scomplete\sthe\sremaining\s3\sbytes.\sIn\scase\sof\sUTF-32,\sthis\scombining\sshould\snot\sbe\sdone,\sbut\ssince\sTcl_UniCharToUtf()\sis\sused\sfor\sUTF-16\stoo,\sthat's\swhere\sthe\sproblem\scomes\sfrom.\sAs\syou\salready\sfound\sout,\sin\sTcl\s9.0\sthis\sis\scorrected.
J login jan.nijtmans
J mimetype text/x-fossil-wiki
K 10c2c17c32ab68e6619f37994b09bbbd06462cd1
U jan.nijtmans
Z eedfc8b8dd56b7ad56b3f94255fe894d