Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Character Encoding and Windows Console woes

by John M. Dlugosz (Monsignor)
on Feb 19, 2004 at 05:40 UTC ( #330147=note: print w/replies, xml ) Need Help??

in reply to Character Encoding and Windows Console woes

I learned how to get the Console to work properly with Perl. I'm posting it here in the hopes of helping someone else some day.

First, changing code pages only works properly if you change the Console window to use a truetype font. Leaving it at "raster fonts" will give strange and even inconsistant results.

The magic incantation is to change to code page 65001. This makes the console operate in UTF-8. Perl programs will now print output correctly.

  • Comment on Re: Character Encoding and Windows Console woes

Replies are listed 'Best First'.
Re^2: Character Encoding and Windows Console woes
by soliplaya (Beadle) on Mar 17, 2007 at 14:26 UTC
    You have helped me greatly, Sir, and I thank you. This is a precious tip. Character set issues in programs are complicated enough by themselves, without adding an additional layer of obfuscation due to the character set and font of the terminal one is using to debug them.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://330147]
[1nickt]: chacham I have wanted to, and dones so, and so stated in a reply, and been roundly downvoted 2-1. (I assume for attempting to censor.)
[1nickt]: pryrt yes, I see. There is no way to differentiate without forcing to a string and all sort of weird stuff. It is enough. User 42 can get creative if s/he wishes.
[chacham]: i sent him a private message expressing my displeasure.
[1nickt]: chacham It was worse than 2-1 ! almost 4-1 !
[jdporter]: Dang. No good example of how to use IPC::Run's run() in its simplest mode?
[LanX]: him or her! ;)

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (15)
As of 2017-05-24 20:54 GMT
Find Nodes?
    Voting Booth?