From: SourceForge.net <no...@so...> - 2005-08-05 21:01:45
|
Bugs item #1252475, was opened at 2005-08-05 09:57 Message generated for change (Comment added) made by dkf You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1252475&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 37. Init - Library - Autoload Group: current: 8.4.11 Status: Closed Resolution: Fixed Priority: 4 Submitted By: Victor Wagner (vbwagner) >Assigned to: Donal K. Fellows (dkf) Summary: Tcl doesn't properly recognize cp1251 encoding on Solaris Initial Comment: Solaris use non-standard name for cp1251 charset. nl_langinfo(CODESET) returns ansi-1251 instead of CP1251 on most other Unices. It seems that it is only locale on Solaris with such a property Proposed fix is trivial: --- tclUnixInit.c.orig 2005-08-05 12:55:15.000000000 +0400 +++ tclUnixInit.c 2005-08-05 12:55:52.000000000 +0400 @@ -81,6 +81,9 @@ static CONST LocaleTable localeTable[] = { #ifdef HAVE_LANGINFO {"gb2312-1980", "gb2312"}, +#ifdef __sun + {"ansi-1251", "cp1251"}, +#endif #ifdef __hpux {"SJIS", "shiftjis"}, {"eucjp", "euc-jp"}, ---------------------------------------------------------------------- >Comment By: Donal K. Fellows (dkf) Date: 2005-08-05 22:01 Message: Logged In: YES user_id=79902 I've fixed this (sans #ifdefs) on HEAD and 8.4 branch. Dratted vendors. ---------------------------------------------------------------------- Comment By: Victor Wagner (vbwagner) Date: 2005-08-05 21:21 Message: Logged In: YES user_id=757679 Probably #ifdef can be safely omitted. I cannot imagine a system, where ansi-1251 means something other than cp1251. But same applies to hpux-specific SJIS, eucjp etc, which are hidden under #ifdef __hpux. I've just modelled my patch after existing __hpux specific code. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2005-08-05 20:40 Message: Logged In: YES user_id=80530 Are the #ifdef's important? Any reason to restrict this encoding alias to only Sun (-compiled) systems? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1252475&group_id=10894 |