discuss-gnustep
[Top][All Lists]
Advanced

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

Re: GSString problem


From: Richard Frith-Macdonald
Subject: Re: GSString problem
Date: Mon, 5 Jul 2004 17:00:11 +0100


On 5 Jul 2004, at 15:51, Alexander Malmberg wrote:

Richard Frith-Macdonald wrote:
On 5 Jul 2004, at 15:22, Alexander Malmberg wrote:
[snip]
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

Fair enough, but can you think of any reason why a user would ever do
that? :)

I try not to second guess people. I don't think *I* am ever going to do that,
but perhaps someone might want to use strict ascii to enforce some sort
of portability rule they have invented.

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

Agreed.

I wasn't aware that Unicode.m ever pretended ascii==iso-8859-1 ... I
don't think it should.

GSToUnicode silently accepts input bytes >=128 for
NSASCIIStringEncoding, effectively treating them as iso-8859-1. Not sure
if there are any other places left.

Currently, this has the advantage that stray 8-bit values in eg.
filenames won't cause horrible problems by default. If iso-8859-1 is
made the default again, I think it should be fixed.

OK ... I think that's in CVS properly now.





reply via email to

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