Le 9 juin 07 à 22:42, Yen-Ju Chen a écrit :

> On 6/9/07, Quentin Mathé <[EMAIL PROTECTED]> wrote:
>>> I need to know what's the output of 'locale' command.
>>
>> LANG=
>> LC_COLLATE="C"
>> LC_CTYPE="C"
>> LC_MESSAGES="C"
>> LC_MONETARY="C"
>> LC_NUMERIC="C"
>> LC_TIME="C"
>> LC_ALL="C"
>
>   It is interesting that LC_CTYPE is 'C',
>   which means it treats all character as C encoding (ASCII ?).
>
>>> And what is your default C string encoding [NSString
>>> defaultCStringEncoding].
>>
>> NSMacOSRomanStringEncoding
>
>   And all Cocoa (and probably Carbon) applicaions
>   treats characters as Roman.
>   Then I wonder how Unix command, like 'more' and 'vi', see the  
> characters.

Badly like that:
$ more TestAccent.txt
<83>toil<8E>

That's why I always set my text encoding to UTF-8 in Save Panel.

>   It also raises the question what is the encoding of the file system
>   (filename). Is it UTF8 (compatible with ASCII) or MacOSRoman ?

iirc HFS+ uses UTF-8.
Here is 'ls' output example:
$ ls
E??toile??
Liens a?? trier
Ico??ne

This looks like UTF-8 when you consider UTF-8 is ASCII compatible and  
only accents are wrongly intepreted here (not the whole character as  
with Roman).

>   A quick way to see is changing line 416 in TXTextView.m to
>   difference encoding and see.
>   It is where it decides how to convert characters into NSString.

Do you want I try that on Mac OS X (by compiling TermX on it) or on  
Ubuntu/GNUstep?

Quentin.


_______________________________________________
Etoile-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-discuss

Répondre à