Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: How to print utf8 char in Term::Screen::Win32 ?

by Anonymous Monk
on Mar 18, 2012 at 07:59 UTC ( #960268=note: print w/ replies, xml ) Need Help??


in reply to How to print utf8 char in Term::Screen::Win32 ?

Two things, you need to tell cmd.exe to accept/display utf8, which is one of

Win32::Console::OutputCP( 1253); Win32::Console::ANSI::ScriptCP( 1253 );
and setting console to some truetype font, See Re: Character Encoding and Windows Console woes, chcp 65001

If Term::Screen::Win32 doesn't use STDIN/STDOUT, you need to binmode whatever handle it uses , or you may need to decode the characters/bytes you get from Term::...


Comment on Re: How to print utf8 char in Term::Screen::Win32 ?
Download Code
Re^2: How to print utf8 char in Term::Screen::Win32 ?
by exilepanda (Monk) on Mar 21, 2012 at 02:59 UTC
    Thank you very much! As you said, things go weir when I am not using STDIN. Whatever code page I use, and whatever long char I type, the getch give me 65533... =( Still investigation..

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://960268]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2014-12-25 23:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls