<i18n dev> Codereview request for 4153167: separate between ANSI and OEM code pages on Windows

Xueming Shen xueming.shen at oracle.com
Mon Feb 13 15:16:21 PST 2012

On 2/13/2012 11:07 AM, Bill Shannon wrote:
> Thanks for fixing this!
>> The webrev is at
>> http://cr.openjdk.java.net/~sherman/4153167/webrev
> You probably don't need to malloc 64 bytes for a string that's
> going to be less than 16 bytes.  And shouldn't you use snprintf
> in any event?
> Unlike Unix, I assume Windows has no way to have multiple "console"
> devices, with stdout and stderr pointing to different devices?
> Is the console the only device that's FILE_TYPE_CHAR?  Are there no
> serial port devices or other devices that are also of that type?

The Windows API doc says "LPT device or a console". The wiki's LPT 
section suggests
it should also use IBM style extended ASCII cs, so I would assume it's 
fine to use the
oem code page, if there is any > LPT usage.
LPT* (Line Print Terminal or Local Print Terminal) is the original, and 
still common, name
of the parallel port <http://en.wikipedia.org/wiki/Parallel_port> 
interface on IBM PC-compatible 
<http://en.wikipedia.org/wiki/PC_compatible> computers 
<http://en.wikipedia.org/wiki/Computer>. It was designed to operate
a text printer <http://en.wikipedia.org/wiki/Computer_printer> that used 
IBM <http://en.wikipedia.org/wiki/IBM>'s 8-bit extended ASCII 
<http://en.wikipedia.org/wiki/Extended_ASCII> character set 


> Can you detect the case of creating an InputStreamReader using the
> default encoding, wrapped around the InputStream from System.in
> that refers to the console?  If so, it might be good to handle that
> case as well, although at this point I would consider that to be
> "extra credit"!  :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/i18n-dev/attachments/20120213/60edd330/attachment.html 

More information about the i18n-dev mailing list