Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Unicode again, in Win7 cmd

by choroba (Cardinal)
on Jun 07, 2013 at 11:27 UTC ( [id://1037656]=note: print w/replies, xml ) Need Help??


in reply to Unicode again, in Win7 cmd

The characters are encoded in bytes. Therefore, the terminal should be set to utf-8, but the STDOUT should not. Remove the binmode. (You can safely remove use utf8 and use Encode, too. There is no unicode character in the code for the first one.)
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re: Unicode again, in Win7 cmd
by hdb (Monsignor) on Jun 07, 2013 at 11:31 UTC

    Without binmode I get "╱╲" instead of "╱╲".

    Sorry: was meant as reply to choroba.

      Nice. On my utf-8 terminal:
      echo ╱╲ | iconv -f utf8 -t cp1252
      ╱╲
      
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

        Now this works (prints black spade suit):

        system( "chcp 65001" ); print "\xe2\x99\xa0\n";

        It seems that the font I am using "Lucida Console" (and the other fonts offered in "Properties") just has no entries for the diagonals :-<

        A quick look into the "Character Map" tool confirms this. All this time wasted...

        Thanks for all your replies. From here I guess I need to find out which fonts have the diagonals and how can I get cmd.exe to use one of them. But this is not a Perl question.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-04-19 13:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found