Am 18.08.2010 07:22, schrieb Sebastian Plotz:
>    Am 18.08.2010 00:34, schrieb Bruce Dubbs:
>> Sebastian Plotz wrote:
>>> Am Dienstag, den 17.08.2010, 15:55 -0500 schrieb Bruce Dubbs:
>>>> Hmm.  What charset am I using?
>>> I guess that's the basic charset of ANSI C (see
>>> http://openbook.galileocomputing.de/c_von_a_bis_z/003_c_grundlagen_001.htm#mj6cc85534f12d7e0868b75171de8d087e).
>>>
>>> The prototype of printf:
>>>
>>> int printf(const char * restrict format, ... );
>>>
>>> And it uses a char pointer (not a wchar_t pointer).
>>>
>>> If you want to print a wchar_t, you have to do the following:
>>>
>>> wchar_t ch = L'Z';
>>>
>>> print("%lc", ch);
>> That's my point.  A standard C program doesn't normally use utf-8.  The
>> programmer has to go out of his way to use it.
>>
>> The whole issue of the console configuration has to do with running
>> applications on the console, not X or ssh based.  How much do people do
>> that any more?  I'd say very few.
>>
>> That's not to say that we shouldn't try to get the information about
>> consoles right.  We should.  However the consequences of getting it
>> wrong are probably not significant.
>>
>>      -- Bruce
>>
> I'm note sure, but I think that the LANG variable influences the
> encoding of the output. So we should enable unicode mode if we're using
> de_DE.UTF-8 and for de...@euro we should leave the unicode mode disabled
> (and -m 8859-15 needs to be specified). I think Ubuntu uses the unicode
> mode and sets the LANG variable to de_DE.UTF-8 (in a german installation).
>
> But I'm not shure, if this is true (it needs to be verified). Simple
> programs like your example will still work in unicode mode (because
> UTF-8 is ASCII compatible).
Seems to be true ... See http://www.cl.cam.ac.uk/~mgk25/unicode.html#c
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to