http://qs321.pair.com?node_id=11144689


in reply to Re^3: Problem with escape sequence \x for hex with spaces "\x{ 263A }"
in thread Problem with escape sequence \x for hex with spaces "\x{ 263A }"

I think you need to append 'O' for "Output" to the '-C'

(my CMD-terminal has CP 850 so no emojis, sorry °)

C:\tmp>perl -we" binmode STDOUT, ':utf8'; print qq[\x{263A}] " Ôÿ&#9553; C:\tmp>perl -CO -wde0 ... main::(-e:1): 0 DB<1> print "\x{263A}" Ôÿ&#9553; DB<2>

UPDATE (codepage)

°) ah found the way to change the codepage

C:\tmp>CHCP 65001 Aktive Codepage: 65001. C:\tmp>perl -CO -wde0 ... yadda yadda ... DB<1> print "\x{263A}" &#9786; DB<2>

PM's codeblocks are limited here², thats what I see ---> ☺ (sic)

update (pre tags)

²) or with <pre><tt> tags instead


C:\tmp>perl -CO -wde0

...

  DB<1> print "\x{263A}"
☺
  DB<2>

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery