Hi, It's been a while since I've used Perl / Perlmonks and most useful knowledge has long since eroded its way through my skull and dribbled onto the floor.
I'm using Active Perl (perl 5, version 20, subversion 2 (v5.20.2) built for MSWin32-x64-muli-thread) and want to be able to output some unicode characters (specifically äöüß) so that I can automate some Imagemagick'ing.
At the DOS prompt i can type äöüß just fine (German keyboard) and can create things manually.
I 'assumed' something like the following would print out the same as seen in quotes, but it doesn't, it is replaced with other ASCII art.
#!/usr/bin/perl use strict; use warnings; use encoding 'utf8'; my $str = "abc123äöüß"; print $str;
I read through...
http://perldoc.perl.org/perluniintro.html
http://www.perlmonks.org/?node_id=930785
http://perlmonks.org/?node_id=799088
..and have tried a number of the listed variants, but I'm missing something because nothing is working (I always get other characters).
Any hints at what I'm sure is a trivial problem would be appreciated.

Paul.

In reply to Outputting Unicode to DOS by thekestrel

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.