On Mon, 18 Mar 2002 12:45:48 +0100 Bj�rn Gohla <[EMAIL PROTECTED]> wrote:
>| On Monday 18 March 2002 12:18, Manuel Guesdon wrote:
>| > Hi,
>| >
>| > When I log (with NSDebugFLog or NSDebugLog) string with characters like �,
>| > I get strange characters: é
>| >
>| > He is an example:
>| > NSString* aTest=[NSString stringWithString:@"�"];
>| > NSString* aTest2=[NSString stringWithFormat:@"%@",@"�"];
>| > [aTest writeToFile:@"/tmp/zz"
>| > atomically:NO];
>| > NSDebugFLog(@"%@",aTest);
>| > [aTest2 writeToFile:@"/tmp/zz2"
>| > atomically:NO];
>| > NSDebugFLog(@"%@",aTest2);
>| >
>| > /tmp/zz and /tmp/zz2 are good but not the traces.
>| >
>| > BTW, I have GNUSTEP_STRING_ENCODING=NSISOLatin1StringEncoding in my env.
>|
>| this looks like the output is utf encoded while your terminal is in single
>| byte mode.
I don't think so:
When I read on the same term /tmp/zz2 and the log file there's a difference.
I've found another problem:
NSString* aTest=[NSString stringWithString:@"�"];
NSMutableDictionary* dict=[NSMutableDictionary dictionaryWithObject:aTest
forKey:aTest];
[dict writeToFile:@"/tmp/zz3"
atomically:NO];
create a zz3 file like this:
{
"\U00e9" = "\U00e9";
}
and not like this
{
"�" = "�";
}
I think it's related to "locale" (descriptionWIthLocale) but can't find code to
really deal with this in NSString.m
Manuel
--
______________________________________________________________________
Manuel Guesdon - OXYMIUM <[EMAIL PROTECTED]>
14 rue Jean-Baptiste Clement - 93200 Saint-Denis - France
Tel: +33 1 4940 0999 - Fax: +33 1 4940 0998
_______________________________________________
Bug-gnustep mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gnustep