Problems with iso_8859_1 locale

Problems with iso_8859_1 locale

Post by Fredrik Roube » Wed, 28 Feb 2001 01:56:34



Hi!

The Solaris system I use (SunOS 5.6) has a buggy iso_8859_1 locale
installed. If I enter "LC_CTYPE=iso_8859_1 locale -ck LC_CTYPE" to list
the character set then only the letters A-Z and a-z are included, and none
of the accented characters. The same happends for the national locales,
like "de" or "sv".

Could I install a correct locale in my home directory (and how do I do
that) or is there an patch for this bug that I could point my sysadm to?

Grss // Fredrik Roubert

--


http://www.efd.lth.se/~d95fr/        CH-8003 Zrich

 
 
 

Problems with iso_8859_1 locale

Post by Mason » Wed, 28 Feb 2001 07:55:53


Quote:Fredrik Roubert wrote...

>Hi!

>The Solaris system I use (SunOS 5.6) has a buggy iso_8859_1 locale
>installed. If I enter "LC_CTYPE=iso_8859_1 locale -ck LC_CTYPE" to list
>the character set then only the letters A-Z and a-z are included, and none
>of the accented characters. The same happends for the national locales,
>like "de" or "sv".

>Could I install a correct locale in my home directory (and how do I do
>that) or is there an patch for this bug that I could point my sysadm to?

Before you jumped to a conclusion that it's a bug, you need to
do somethings before the 8-bit characters show up.

Here are settings for csh, change accordingly for sh.
  1) .cshrc file contains:
     tty -s
     if ($status == 0) stty cs8 -istrip -parenb
  2) .login file contains:
     setenv LANG C
     setenv LC_CTYPE iso_8859_1
  3) .XDefaults contains a font which is of iso8895-1. E.G.:
XTerm*font:-misc-fixed-medium-r-normal--20-200-75-75-c-100-iso8859-1

Then run the follwing script to show up the 8-bit ASCII table.
cat test8bit.sh
#!/bin/sh
clear
for i in `echo 2 3`
do
  for j in `echo 0 1 2 3 4 5 6 7`
  do
    for k in `echo 0 1 2 3 4 5 6 7`
    do
      n=`expr \( "$k" + "$j" \* 8 + "$i" \* 64 \)`
      if [ $n -ge 160 ]
       then  echo "`expr $n` \\0$i$j$k\\t\\c"
      fi
    done
    echo
  done
done

You should see something like this.

160 ?   161 ?   162   163   164   165   166 |   167
168   169 ?   170 a   171 ?   172 ?   173 -   174 ?   175
176   177   178 2   179 3   180   181   182 ?   183
184 ?   185 1   186 o   187 ?   188 ?   189 ?   190 ?   191 ?
192   193   194 ?   195 ?   196 ?   197 ?   198 ?   199 ?
200   201   202   203 ?   204   205   206 ?   207 ?
208 D   209 ?   210   211   212 ?   213 ?   214 ?   215
216 ?   217   218   219 ?   220   221 Y   222 T   223 ?
224   225   226 a   227 ?   228 ?   229 ?   230 ?   231 ?
232   233   234   235 ?   236   237   238 ?   239 ?
240 e   241 ?   242   243   244 ?   245 ?   246 ?   247
248 ?   249   250   251 ?   252   253 y   254 t   255 ?

 
 
 

Problems with iso_8859_1 locale

Post by Z. Majee » Wed, 28 Feb 2001 10:07:20



> Hi!

> The Solaris system I use (SunOS 5.6) has a buggy iso_8859_1 locale
> installed. If I enter "LC_CTYPE=iso_8859_1 locale -ck LC_CTYPE" to list
> the character set then only the letters A-Z and a-z are included, and none
> of the accented characters. The same happends for the national locales,
> like "de" or "sv".

> Could I install a correct locale in my home directory (and how do I do
> that) or is there an patch for this bug that I could point my sysadm to?

> Grss // Fredrik Roubert

> --


> http://www.efd.lth.se/~d95fr/        CH-8003 Zrich

man locale

NOTES
     If LC_CTYPE or keywords in the category LC_CTYPE are  speci-
     fied,  only  the  values  in the range 0x00-0x7f are written
     out.

Zartaj

 
 
 

Problems with iso_8859_1 locale

Post by Fredrik Roube » Fri, 02 Mar 2001 01:14:05




> Before you jumped to a conclusion that it's a bug, you need to do
> somethings before the 8-bit characters show up.

I had 8-bit characters set up all right, but I did another mistake. (See
next posting.)

Grss // Fredrik Roubert

--


http://www.efd.lth.se/~d95fr/        CH-8003 Zrich

 
 
 

Problems with iso_8859_1 locale

Post by Fredrik Roube » Fri, 02 Mar 2001 01:18:01




> NOTES
>     If LC_CTYPE or keywords in the category LC_CTYPE are  speci-
>     fied,  only  the  values  in the range 0x00-0x7f are written
>     out.

Ah, that explains it. I missed that note. I was investigating some code
that didn't work correctly and as the output of the locale command didn't
show what I expected I assumed that the bug was in the locale, when it
really was a sign extension problem. Thank you!

Grss // Fredrik Roubert

--


http://www.efd.lth.se/~d95fr/        CH-8003 Zrich

 
 
 

1. Solaris iso_8859_1 locale, isw... bugs?

I'm trying to use "iswprint" in OpenWindows 3.2 (Solaris 2.2).  My locale is set to
iso_8859_1 via "*xnllanguage: iso_8859_1" in my .Xdefaults file.  (I'm not calling
setlocale, as is noted in the OLIT 3.2 RM.)  "iswprint" is an ANSI-C function that
returns true if a character is "printable".  However, it seems to think that only
7-bit ASCII characters are printable.

XwcDrawImageString can display characters past decimal 127 in the iso_8859_1 locale,
but not in the default C locale, so I think my locale setting is working properly.
Is the iso_8859_1 locale somehow incomplete, or is it too much to expect of Solaris
to change the action of iswprint when the locale changes?

What happens when I switch to an Asian locale, assuming that my Sun rep can ever
figure out how to get the feature package described in the OLIT manual?  Geez.

Thanks,
Gary

2. Set UID question

3. Locale iso_8859_1 doesn't work

4. on exit xterm totally wrecks linux 2.4.11 to 2.4.14-pre6 (unkillable processes)

5. lib/locale vs share/locale

6. ftp question

7. current locale is not supported in X11, locale is set to CX

8. Will a 386/16 run ok?

9. RogueWave Locale and GNU g++ Locale

10. X error: locale not supported by C library, locale unchanged

11. locale not supported by C library, locale unchanged (What does it mean?)

12. Warning: locale not supported by C library, locale unchanged

13. locale not supported by Xlib, locale set to C