Skip to content
Tcl Source Code Artifact [7ef1356ba9]
Login

Artifact [7ef1356ba9]

Artifact 7ef1356ba906d7a4a91662eb360c855448d5f5af:

Ticket change [7ef1356ba9] - Ticket [219341ffffffffff|219341ffff] <i>Unicode line separator \u2028 not recognized</i> status still Open with 5 other changes by andreas_kupries on 2001-04-10 13:55:51.
D 2001-04-10T13:55:51
J assignee andreas_kupries
J icomment Logged\sIn:\sYES\s\nuser_id=75003\n\nDoug\sEdmunds\sis\s<[email protected]>.\n\nHere\shis\sanswer\sto\smy\squestions\s___________________________\n\nLook\sat\sthe\sattached\sutftest.tcl\sfile.\sThe\s"appropriate\nconversion"\sis\sthe\sline:\n\n\s\s\s\sfconfigure\s$fileid\s-encoding\sunicode\n\nneeded\sto\scorrectly\sread-in\sa\sutf-16\sfile.\sA\sutf-8\sfile\ndoesn't\sneed\sany\sconversion\n\nSince\syou\sasked\sabout\sthis,\sI\shave\sreconstructed\sthe\sissue,\s\nusing\sa\sWindows-based\sunicode\seditor\s(freeware)\scalled\sSC\nUnipad.\sIt\sis\savailable\sat\s\shttp://www.sharmahd.com/unipad/\n\nWith\sthat\sprogram\s(which\suses\sthe\sunicode\sline-separator\ninstead\sof\sCR,\sLF,\sLFCR)\sfiles\scan\sbe\ssaved\sin\sa\smultitude\nof\sunicode\sformats,\sinclude\sutf-8\sand\sboth\sutf-16\sbig\sendian\nand\sutf-16\slittle\sendian.\n\nAttached\sare\s2\sfiles,\sgenerated\swith\sthat\seditor,\nappropriately\snamed\sutf8test.txt\sand\sutf16text.txt.\n\nAlso\senclosed\sis\sa\sshort\stcl\sfile\swhich\sis\ssupposed\sto\sopen\nthese\sfiles\sand\sprint\ssome\sinfo\sout\sto\sa\stcl\sconsole.\sI\sused\nthe\sconsole\sthat\sopens\swith\swish83.exe.\n\nHere's\sthe\sissue:\sInstead\sof\sproducing\n\nTotal\scontents\sof\sthe\sutf-8\sfile\sare:\nthis\sis\sa\sfile\swith\nmultiple\slines,\swhich\nwill\sbe\ssaved\sas\nutf-8\n\nIt\sproduces\nTotal\scontents\sof\sthe\sutf-8\sfile\sare:\nthis\sis\sa\sfile\swithâ?¨multiple\slines,\swhichâ?¨will\sbe\nsaved\sasâ?¨utf-8\n\nSimilarly,\susing\sthe\s'appropriate\sconversion'\sthe\nline-separator\sis\slost,\sfor\sthe\sutf-16\sfile:\n\nthis\sis\sa\sfile\swith\nmultiple\slines,\swhich\nwill\sbe\ssaved\sas\nutf-16\s(little\sendian)\n\nIt\slooks\slike\sthis:\nthis\sis\sa\sfile\swithmultiple\slines,\swhichwill\sbe\ssaved\nasutf-16\s(little\nendian)\n\n(but\swhich\scopy-paste\sconverts\sinto\squestion-marks,\sshowing\nthat\sthe\scharacters\sare\sreally\sretained\sby\stcl,\sbut\sjust\sare\nnot\sbeing\sprinted\scorrectly):\n\nWhat\scopy-from-tcl-console\spaste-to-email\sproduces:\n?this\sis\sa\sfile\swith?multiple\slines,\swhich?will\sbe\ssaved\nas?utf-16\s(little\nendian)?\n\nI\shope\sthis\shelps.\s\sPersonally,\sI\sthink\sthere\swill\salways\sbe\nproblems\suntil\sthe\sunderlying\sOS\sis\sbased\son\sunicode.\n\n
J login andreas_kupries
J mimetype text/plain
J username andreas_kupries
K 219341ffffffffffffffffffffffffffffffffff
U andreas_kupries
Z 8b75d6fa3383f37e2ed719ac44484dc4