Re: [1.7] wprintf is broken?

2009-05-27 Thread IWAMURO Motonori
Sorry, my report is not correct.
Because we must mix neither wide-character I/O nor multibyte-character
I/O in the specification.
(see the manual of fwide() function)

2009/5/17 Corinna Vinschen :
> On May 16 23:56, IWAMURO Motonori wrote:
>> Hi.
>>
>> wprintf is broken?
>>
>> I compile & run the following source:
>>
>> #include 
>> #include 
>> #include 
>> int main(void) {
>>   setlocale(LC_ALL, "en_US.UTF-8");
>>   wprintf(L"%ls\n", L"Test\n");
>>   printf("Test\n");
>>   return 0;
>> }
>>
>> Result text:
>> http://vmi.jp/tmp/wprintf-is-broken.txt
>
> Works for me:
>
>  $ ./wp | od -c
>  000   T   e   s   t  \n  \n   T   e   s   t  \n
>  013
>
>
> Corinna
>
> --
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Project Co-Leader          cygwin AT cygwin DOT com
> Red Hat
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
>
>



-- 
IWAMURO Motnori 

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: [1.7] wprintf is broken?

2009-05-16 Thread Corinna Vinschen
On May 16 23:56, IWAMURO Motonori wrote:
> Hi.
> 
> wprintf is broken?
> 
> I compile & run the following source:
> 
> #include 
> #include 
> #include 
> int main(void) {
>   setlocale(LC_ALL, "en_US.UTF-8");
>   wprintf(L"%ls\n", L"Test\n");
>   printf("Test\n");
>   return 0;
> }
> 
> Result text:
> http://vmi.jp/tmp/wprintf-is-broken.txt

Works for me:

  $ ./wp | od -c
  000   T   e   s   t  \n  \n   T   e   s   t  \n
  013


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/