<i>_MBCS,_UNICODE,Tcl_WinUtfToTChar abuse!</i> status still Open with 4 other changes
by
.
D 2001-09-10T08:33:02
J icomment Logged\sIn:\sYES\s\nuser_id=31992\n\nWell,\sI'm\swaiting\sto\shear\sback\sfrom\sJeff\son\swhether\she\shas\sany\sinsight\son\sthis.\s\sIn\sthe\smeantime,\sI'll\spost\smy\s\nignorance...\n\nTCHAR\sis\seither\sa\schar\s(for\sSBCS\sor\sMBCS)\sor\swchar_t\s(for\sUnicode);\swhich\sdefinition\sit\sgets\sis\sdefined\sby\s\nthe\sUNICODE\spreprocessor\smacro.\s\sAlong\swith\sthe\sTEXT()\smacro\sand\sthe\svarious\stcsxxx()\sfunctions,\sthe\s\nintended\susage\sis\sto\sport\san\sapplication\sbetween\sSBCS/MBCS\sand\sUnicode\seasily\s--\sthat\sis,\san\sapplication\s\ncan\sbe\sswitched\sbetween\sthe\stwo\sby\sflipping\sthe\sUNICODE\smacro.\n\nBut\sthis\sis\sreserved\sfor\sthe\sapplication.\s\sIt\sis,\sIMHO,\sdangerous\sto\shave\sthis\s*anywhere*\sin\sTcl.\s\sDave\sG\s\npoints\sout\sthe\sproblem\skeenly\s(though\sreality\sis\sthe\sreverse:\sTcl_WinUtfToTChar\salways\sreturns\sUnicode\s\nstrings,\snever\sMBCS).\n\nAnyway...\slooking\sat\sthe\svarious\sfiles,\sit\sseems\slike\sthe\sfunctions\saccepting/returning\sTCHARs\sand\sTCHAR\s*'s\s\nshould\suse\sUTF-16\sinstead.\s\sTcl_UniChar\sshould\swork\sfine.\n\nNote\sthat\sthe\sC++\sintrinsic\swchar_t\sdoesn't\sexist\sintrinsically\sin\sC,\sand\sis\sthe\swrong\ssize\son\smost\sUnix\s\ncompilers\s--\sUTF-32\sinstead\sof\sUTF-16.\s\sWCHAR\scould\sbe\sused\sif\swe're\swilling\sto\sbring\sin\sthe\swindows.h\s\nheader\s(which\smay\sbe\sjust\sas\swell\s--\swe'll\sknow\sof\sclashes\sright\saway,\sand\ssince\sboth\sMSVC\sand\sBC\s\nimplement\sprecompiled\sheaders...).\n\n
J login dacut
J mimetype text/plain
J username dacut
K 459115ffffffffffffffffffffffffffffffffff
U dacut
Z 053d07b8cb31ef4a29033017ac469eef