How can I display extended ASCII code characters in Perl?

alt text

How to display 192 character (└) character in perl?

+5
source share
4 answers

What you want is to be able to print Unicode, and the answer is at perldoc perluniintro.

You can use \x{nnnn}where n is the hexadecimal identifier, or you can do \N{...}with the name:

perl -E 'say "\x{2514}"; use charnames; say "\N{BOX DRAWINGS LIGHT UP AND RIGHT}"'
+11
source

, Code Page 437, . CP850 -. - Unicode Block Elements. char, perl, \N{U+2514}. perlunicode

+8

Code 437. Perl, , , . , , UTF8.

, Unicode, UTF-8.

EDIT: .

+5

As usual, Jon Skeet calls it: the code 192is in the extended ASCII range . I suggest you follow @Douglas Leeder's recommendations , but I'm not sure which encoding www.LookupTables.com will give you; ISO-8859-1thinks that 192 displays “À”, and Mac OS Romanthinks about his “¿”.

+3
source

All Articles