<i>clock format %c %X %Z output garbled string on Windows</i> status still Open with 4 other changes
by
.
D 2005-10-17T02:43:16
J icomment Logged\sIn:\sYES\s\nuser_id=99768\n\nHmm,\sI\sneed\sto\sfind\ssome\sof\smy\sold\snotes\shere.\n\nIn\sgeneral,\sthe\sWindows\scode\stries\sto\suse\sthe\snative\sUnicode\ninterfaces\swherever\spossible,\sand\sin\sany\scase\sto\sconvert\sto\nUTF-8\sas\sclose\sto\sthe\ssystem\scall\sas\spossible,\sso\sTcpGetTZName\nis\ssupposed\sto\sreturn\sUTF-8.\sLOCALE_USE_CP_ACP\sis\nThe\sWrong\sThing,\ssince\sit\swill\slose\sany\scharacters\sthat\saren't\non\sthe\ssystem\sANSI\scode\spage.\n\nIt\slooks\sas\sif\sthe\sright\sthing\shere\swill\sbe\sto\scall\nGetDateFormatW\nif\sit's\savailable\s(and\sthen\sconvert\sthe\sresulting\sUnicode\sto\nUTF-8).\s\sOn\sW98/Me\ssystems\sthat\slack\sGetDateFormatW,\nwe\sneed\sto\sdo\sTclWinTCharToUtf\son\sthe\sTCHAR\sstring\nthat's\sreturned,\sand\shope\sfor\sthe\sbest.\s\s(Or\sstart\srequiring\nMSLU\s-\swhich\swould\sbe\smy\spreference,\ssince\sthen\sTcl\nat\sleast\sgets\sa\sconsistent\sAPI\sto\sstart\sfrom.)\n\nAt\sone\spoint,\swe\shad\sa\spath\sthrough\sthe\scode\sthat\scaused\ndouble\sconversion\s(interpreting\sa\sUTF-8\sstring\sas\sif\sit\swere\nin\ssystem\slocale)\swhich\scaused\strouble.\s\sThat\swas\sbug\s624408,\nwhich\sgot\sfixed\squite\ssome\stime\sago\sby\sclarifying\swhat\ninterfaces\nreturn\sUTF-8.\s\sThis\sappears\sto\sbe\sa\scase\sthat\swe\smissed.\n
J login kennykb
J mimetype text/plain
J username kennykb
K 1317477fffffffffffffffffffffffffffffffff
U kennykb
Z 3785ad9afcce796ea113c88958d4399a