In case the mailer mangles the diagnostic: With code page 437 active,
‘type’ and ‘cat’ print different garbage symbols to the console. With
code page 65001 active, ‘type’ correctly prints the first four letters
of the Greek alphabet, but ‘cat’ complains.

—Joel Salomon

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org_______________________________________________
MinGW-users mailing list
[hidden email]

Re: Bug re. Unicode on the console

I don't intend to be rude, but I think it is fairly naïve to even expect stuff like that to work...

--tml

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org_______________________________________________
MinGW-users mailing list
[hidden email]

Re: Bug re. Unicode on the console

Tor Lillqvist wrote:
> I think it is fairly naïve to even expect stuff like that to work...

Why? The file is encoded in UTF-8, so ‘type’, given the proper code
page, outputs it correctly. Obviously (given the different default
outputs between the programs) ‘type’ & ‘cat’ handle the console
differently. But—
• Why? and
• Why on earth does ‘cat’ fail with the message
“write error: Permission denied”?

I tried this test with ‘ct’ opening the file in both text and binary
modes. Now there’s obviously trouble somewhere, since ferror(stdout) is
set after utf-8 output is sent. (The command “ct ct.c” works without
error.) But that doesn’t explain the error from ‘cat’, nor why it’s
“naïve” to expect this to work.

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org_______________________________________________
MinGW-users mailing list
[hidden email]

This seems an interesting case, but probably it cannot work. Microsoft
has indicated clearly that UTF-8 cannot be used a valid locale,
because its runtime supports only double-byte character system (DBCS),
and no more than two bytes. In fact, your code does not run under MSVC
either--so it is not a GCC failure.

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org_______________________________________________
MinGW-users mailing list
[hidden email]

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org_______________________________________________
MinGW-users mailing list
[hidden email]