|
From: | Andreas Hoeschler |
Subject: | Re: GSString problem |
Date: | Mon, 5 Jul 2004 16:56:46 +0200 |
after upgrading to a recent version of GNUstep my app throws the
following exception.
NSCharacterConversionException REASON: Can't get cStringLength from
Unicode string
I've had other reports of c-string related conversions failing when they
didn't before, and I suspect that:
2004-02-17 Bruno Haible <bruno@clisp.org>
* Source/Additions/Unicode.m (GetDefEncoding): Use the result of
nl_langinfo(CODESET) before falling back on ISO-8859-1.
is causing it by setting the c-string encoding to ASCII when it used to
be set to iso-8859-1. If so, setting the environment variable
GNUSTEP_STRING_ENCODING to NSISOLatin1StringEncoding should fix it.
Do we really ever want to set the c-string encoding to
NSASCIIStringEncoding instead of NSISOLatin1StringEncoding? (Especially
since parts of Unicode.m is pretending that ascii==iso-8859-1 anyway.)
I guess we do if the user wants to ...
ie if GNUSTEP_STRING_ENCODING specifies ASCII
However, I think it's probably sensible to use ISO-8859-1 if GNUSTEP_STRING_ENCODING
is not defined and nl_langinfo(CODESET) says ASCII
I wasn't aware that Unicode.m ever pretended ascii==iso-8859-1 ... I don't think it should.
[Prev in Thread] | Current Thread | [Next in Thread] |