Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: [OT] ASCII, cmd.exe, linux console, charset, code pages, fonts and other amenities

by Corion (Patriarch)
on Mar 29, 2019 at 13:34 UTC ( [id://1231867]=note: print w/replies, xml ) Need Help??


in reply to [OT] ASCII, cmd.exe, linux console, charset, code pages, fonts and other amenities

On Windows (7 and 10 at least), you can run

chcp 65001

to make the console (and thus STDOUT) understand UTF-8. Then, many more characters become supported.

  • Comment on Re: [OT] ASCII, cmd.exe, linux console, charset, code pages, fonts and other amenities
  • Download Code

Replies are listed 'Best First'.
Re^2: [OT] ASCII, cmd.exe, linux console, charset, code pages, fonts and other amenities
by Discipulus (Canon) on Mar 29, 2019 at 20:54 UTC
    thanks Corion, I read about this already but really do not understand what it really means..

    chcp Active code page: 65001 perl -e "print chr($_) for 1..256" Wide character in print at -e line 1. !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW +XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ &#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#6553 +3;&#65533; .... more of these..

    Even with this codepage and in win7 I get the dreadful wide character in print message..

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
      You need to tell Perl your terminal now works in UTF-8.
      perl -CO -we "print chr for 1 .. 255"
      An you can try higher numbers than 255, too.

      Update: Missing -e, thanks Your Mother.

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Log In?
Username:
Password:

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

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

    No recent polls found