|
2005-08-06
| ||
| 04:01 | • Ticket [1252475fff] Tcl doesn't properly recognize cp1251 encoding on Solari... artifact: 3e54ec80b7 user: dkf | |
| 03:48 | • Closed ticket [1252475fff]. artifact: bfeba54fb0 user: dkf | |
| 03:21 | • Ticket [1252475fff]: 4 changes artifact: 685d342364 user: vbwagner | |
| 02:40 | • Ticket [1252475fff]: 4 changes artifact: ac1023680b user: dgp | |
|
2005-08-05
| ||
| 08:57 | • New ticket [1252475fff]. artifact: f430e47c0d user: vbwagner | |
Tcl doesn't properly recognize cp1251 encoding on Solaris
Closed / Fixed1252475fffffffffffffffffffffffffffffffffCreated 21 years agoUpdated 21 years ago
Descriptionplain2005-08-05 08:57:06
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"},
dgpplain2005-08-06 02:40:10
Logged In: YES user_id=80530 Are the #ifdef's important? Any reason to restrict this encoding alias to only Sun (-compiled) systems?
vbwagnerplain2005-08-06 03:21:59
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.
dkf Closed ticket [1252475fff].
[History diff]2005-08-06 03:48:35
dkfplain2005-08-06 04:01:45
Logged In: YES user_id=79902 I've fixed this (sans #ifdefs) on HEAD and 8.4 branch. Dratted vendors.
Log in (anonymous is fine) to add a comment.