How to printf Japanese Word
Jeff Johnston
jjohnstn@redhat.com
Tue May 26 16:46:00 GMT 2009
Qiang Wang wrote:
> hi, thanks for your answer.
> I use arm-elf-gcc and run the newlib in the arm target board.
> I print out the string through the serial cable.
> If I use my printf_me, the Japanese will be printed very well.
> I have found that printf in newlib will cut the MSB of the byte.
> I even modify some MACRO and re-compile the newlib to support wide
> character string.
> But I can not get the Japanese work print .
>
>
Hello,
What is the hex representation of the multibyte string you are trying to
print?
I have noticed that in lower I/O functions for line-buffered streams
(stdout is one), there are checks for single-byte newline which would
not work in the case of multibyte characters containing 0A
-- Jeff J.
> best regards
> wangqiang
>
> 2009/5/25 IWAMURO Motonori <deenheart@gmail.com>:
>
>> Hi.
>>
>> Which is the version of Cygwin 1.5 or 1.7?
>> What is the terminal emulator that you are using?
>> What is the encoding of the source? (UTF-8, Shift_JIS (CP932), or EUC-JP?)
>>
>> 2009/5/25 Qiang Wang <rurality.wq@gmail.com>:
>>
>>> hi, all
>>> I try to print out the Japanese word with printf or cout.
>>> But the Japanese string have been converted into other words.
>>> So how can I print out the word.
>>>
>>> thank you very much.
>>>
>>> best reguards
>>> wangqiang
>>>
>>>
>>
>> --
>> IWAMURO Motnori <http://vmi.jp/>
>>
>>
More information about the Newlib
mailing list