Skip to content
Tcl Source Code Artifact [172b710a2a]
Login

Artifact [172b710a2a]

Artifact 172b710a2a23ed369b4538794372d8785b8aecbd:

Ticket change [172b710a2a] - New ticket [535705ffffffffff|535705ffff] <i>Tcl interface to stop on encoding errors</i>. by nobody on 2002-03-27 13:19:11.
D 2002-03-27T13:19:11
J assignee dkf
J cmimetype text/plain
J comment When\s[encoding\sconvertto]\sencounters\sa\scharacter\sthat\s\ncannot\sbe\srepresented\sin\sthe\starget\sencoding,\sit\s\nsilently\ssubstitutes\sa\sdefault\sinstead.\sIn\sthe\sC\s\ninterface\sthere\sis\sa\sflag\sTCL_ENCODING_STOPONERROR\swhich\s\ninstead\scauses\sthe\sunderlying\sfunction\sto\sreturn\swith\san\s\nerror\swhen\sthis\scondition\soccurs.\sIt\swould\sbe\suseful\sto\s\nhave\sa\sswitch\sfor\s[encoding\sconvertto]\sto\sget\sthe\ssame\s\nbehaviour\sthere,\sespecially\sfor\scross-platform\s\ninstallation\sprograms\s(where\sencoding\sconversions\sare\s\ncommon\sand\sunnoticed\scharacter\ssubstitutions\scan\sbe\svery\s\ndangerous).\n\nPS:\sWhile\sI'm\sat\s[encoding]\sanyway,\sI\smight\sas\swell\s\npoint\sout\sthat\sthe\sman\spage\sfor\sthe\s[encoding]\scommand\s\n(of\sTcl8.4\sas\scurrently\son\stcl.activestate.com)\sin\sthe\s\nExample\ssection\sincorrectly\sclaims\sthat\s"because\sthe\s\nsource\scommand\salways\sreads\sfiles\susing\sthe\sISO8859-1\s\nencoding,\sTcl\swill\streat\seach\sbyte\sin\sthe\sfile\sas\sa\s\nseparate\scharacter\sthat\smaps\sto\sthe\s00\spage\sin\sUnicode".\s\nI\sbelieve\sthe\struth\sis\srather\sthat\s[source]\suses\sthe\s\nsystem\sencoding.\sThe\sexample\sshould\swork,\ssince\s\\xHH\s\nproduces\scharacter\sin\ssaid\sUnicode\spage,\sbut\sincluding\s\nthe\scorresponding\sbytes\sas\sexplicit\scharacters\sin\sthe\s\nsource\sprobably\swon't\swork\scross-platform.\n
J foundin None
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 16.\sCommands\sA-H
J title Tcl\sinterface\sto\sstop\son\sencoding\serrors
J type RFE
K 535705ffffffffffffffffffffffffffffffffff
U nobody
Z b50e5baf2d1caa423a967834d7ae78ad