Skip to content
Tcl Source Code Artifact [d073c629cc]
Login

Artifact [d073c629cc]

Artifact d073c629cc3fef27a63cc2d82be93a0109be0428:

Ticket change [d073c629cc] - Ticket [1201171fffffffff|1201171fff] <i>TclpSetInitialEncodings works only once on Unix</i> status still Open with 4 other changes by yaroslav1 on 2005-05-18 14:55:52.
D 2005-05-18T14:55:52
J icomment Logged\sIn:\sYES\s\nuser_id=1272045\n\nSorry,\sI\smisled\syou\s(and\sforgot\sto\sdescribe\sa\sproblem).\s\n\nThis\sis\sa\spart\sfrom\soriginal\sletter\s(not\sin\stclkit\sforum,\nsorry\sagain):\n-------------------------\nSergey\sVlasov\svsu\sat\saltlinux.ru\nSat\sApr\s16\s18:32:59\sCEST\s2005\nDoes\sanyone\sknow\show\sto\smake\stclkit\sfind\sand\suse\sthe\sproper\s\nsystem\sencoding\sin\sa\snon-English\slocale?\n\nI\shave\stried\stclkit-linux-x86-8.4.9\swith\sLANG=ru_RU.KOI8-R,\nand\salso\sthe\s8.4.9\sWin32\sversion\sunder\sWindows\s98,\sand\s\nboth\shave\sthe\ssame\sproblem:\seven\sif\sI\srebuild\stclkit\swith\sall\n\sencoding\sfiles\s(as\sdescribed\sat\s\nhttp://www.equi4.com/tkunicode.html),\sI\sstill\sget:\n\n$\stclkit\n%\sencoding\ssystem\niso8859-1\n\n(the\sWin32\sversion\sgives\scp1252,\swhich\sis\salso\sbad\s-\s\nthe\sreal\ssystem\sencoding\sin\sthat\scase\sis\scp1251).\n\nWhen\sa\sTk\sapplication\sis\slaunched\sin\ssuch\senvironment\s(I\stried\nNotebook\s-\shttp://notebook.wjduquette.com/),\sit\shas\smajor\s\nproblems:\nall\skeyboard\sinput\sis\sassumed\sto\sbe\sin\sthe\sbroken\ssystem\s\nencoding,\stherefore\sI\sget\siso8859-1\saccented\sletters\sinstead\nof\sCyrillic\scharacters.\s\sObviously,\sthis\smakes\sstarkits\nunusable.\n\nI\stried\sthe\snewer\stclkit\sversion\s(8.5.a2)\son\sLinux\n(http://www.equi4.com/pub/tk/8.5a2/tclkit-linux-x86.gz),\sand\nwith\nLANG-ru_RU.KOI8-R\sit\sdoes\snot\sstart\sat\sall:\n\n$\stclkit-linux-x86-8.5a2\s\nsystem\sencoding\s"\nzsh:\sabort\s\s\s\s\s\stclkit-linux-x86-8.5a2\n\nIf\sI\sexecute\s"encoding\ssystem\skoi8-r"\s(after\seither\sadding\sthe\nappropriate\sencoding\sfiles\sto\stclkit,\sor\scopying\sthem\sas\ndescribed\sin\nhttp://wiki.tcl.tk/10382),\sthen\sit\sseems\sto\swork\s(I\stried\sto\ninsert\nthis\sstatement\sinto\nnotebook2.1.1.vfs/lib/app-notebook/notebook.tcl\nafter\scopying\sof\sthe\sencoding\sfiles,\sand\ssuch\shacked\nNotebook\scan\nhandle\sCyrillic\scharacters\sproperly).\s\sBut\sobviously\nhardcoding\sthe\nencoding\sname\sis\snot\sacceptable\s-\sthe\sencoding\sshould\sbe\s\ndetermined\sautomatically,\slike\sthe\s"real"\sTcl\sdoes\sit.\n\nLooking\sat\stclUnixInit.c:TclpSetInitialEncodings(),\sI\ssee\nthat\sTcl\ntries\sseveral\smethods\sto\sdetect\sthe\ssystem\sencoding\sand\suses\nthe\s\nfirst\sencoding\sfor\swhich\sTcl_SetSystemEncoding()\ssucceeds.\s\s\nHowever,\sat\sthis\spoint\sthe\sencoding\sfiles\sstored\sinside\ntclkit\sare\s\nnot\syet\savailable\s(because\svfs\sis\snot\sinitialized),\ntherefore\sall\ncalls\sto\sTcl_SetSystemEncoding()\sfail,\sand\ssystem\sencoding\sis\nleft\sset\sto\s"identity".\n-------------------------------------------------\nMy\sadditons\sto\sit:\n\nOn\swindows,\stclkit\sfails\sbecause\sof\sits\sproblems\sin\sworking\nwith\sVFS.\sThis\sis\sfrom\smy\sbug\sreport\sto\sthem:\n----------------------------\nOn\swindows\s(and\sat\sall),\sthere\sis\sa\sbug\sit\sboot.tcl\sin\stclkit:\n\nvfs::filesystem\sunmount\s$noe\n\nExample\sin\srussian\slocale\son\sWin98\s(cp1251):\nnoe:\sD:/TCLKIT/&#1088;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081;/TCLKIT-WIN32-NEWEST.EXE\n::vfs::filesystem\sinfo:\nd:/tclkit/&#1088;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081;/tclkit-win32-newest.exe\n\nCase\sdiffers,\sso\sit\ssays:\s"no\ssuch\smount"\sand\scrashes\s\n(on\sWin98\sonly).\nReplaced\swith:\nvfs::filesystem\sunmount\s[::vfs::filesystem\sinfo]\ntclkit-win32-newest.exe\swith\sadded\sencodings\sby\s\ntkunicode.html\son\sthe\ssite\sworks\sok.\n----------------------------\n\nSo,\sthere\sis\sno\sbug\sin\sTcl\sitself\son\sWindows,\sbut\son\sUnix,\nwhen\stclkit\stries\sto\sset\ssystem\sencoding\ssecond\stime\s(with\nencodings\sloaded),\sthis\sfunction\sjust\sdoesn't\sdo\sit\sas\sI\ndescribed\nbefore.\sSo,\ssystem\sencoding\sjust\sgets\s"fixed"\sby\stclkit\sstartup\ncode\sfrom\s"identity"\sto\siso8859-1,\swhich\sis\snot\scorrect.\n\n\n\n\n\n\n\n\n\n
J login yaroslav1
J mimetype text/plain
J username yaroslav1
K 1201171fffffffffffffffffffffffffffffffff
U yaroslav1
Z 4d66df09fb6b91391a45b30d0f1a5d39