discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unicode and GNUstep (more info)


From: Andreas Hoeschler
Subject: Re: Unicode and GNUstep (more info)
Date: Fri, 10 May 2002 17:42:17 +0200

Hi Richard,

1. On my copy of GNUstep (Debian, Intel), the above test program prints 'char: 246' as
it does on your MacOS-X system.

Oh!

2. What you are doing is actually illegal ... the contents of a constant literal string created using the @"" syntax are supposed to be ascii (ie 7-bt characters with the eighth bit clear). The behavior
when you use non-ascii characters is undefined.

I always do this on MacOSX and it always works. What would be the alternative approach if you want to create a qualifier with fixed values in code?

That being said ...

The ö character has the value 246 in both unicode and ISO latin 1
The GNUstep default character encoding for C-strings is Latin 1

So it should (and on mys system does) work as you are expecting as long as you have not changed your default encoding (GNUSTEP_STRING_ENCODING environment variable), assuming you are using an
up to date copy of GNUstep of course.

I am using the latest cvs version. I am not aware of having touched $GNUSTEP_STRING_ENCODING. However, it does not seem to be set on my system.

bash-2.03# echo $GNUSTEP_STRING_ENCODING

bash-2.03# defaults read NSGlobalDomain
NSGlobalDomain Local Time Zone 'Europe/Berlin'
NSGlobalDomain NSLanguages 'English'
bash-2.03#

Is this ok? Where should I set it and how?

So, if the GNUSTEP_STRING_ENCODING setting is not your problem, and you are using up to date software, it would be interesting to know about your machine/os, compiler etc.

I am on Solaris 8 with gcc-3.0.4 compiled from sources.

Thanks,

   Andreas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]