in reply to Re: Determine encoding of STDOUT
in thread Determine encoding of STDOUT

The UTF-8 support for the Windows console is full of problems, although I wonder if some go away if a cygwin bash shell is used.

Replies are listed 'Best First'.
Re^3: Determine encoding of STDOUT
by tchrist (Pilgrim) on May 04, 2011 at 17:45 UTC
    If I want a portable program, I’ll generate Unicode output.

    If I want a non-portable program, I’ll generate output in some non-portable, legacy vendor encoding.

    I never ever do the second.

    It’s a shame that Microsoft is still lagging behind on proper Unicode support, but that is hardly Perl’s fault. Perl makes it easy to write portable programs, and bending over backwards to accomodate Microsoft-only idio(t)syncrasies seems like a self-limiting and very niche environment.

      It’s a shame that Microsoft is still lagging behind on proper Unicode support,

      It's great outside the console, but I agree about the console. Microsoft's lack of attention to the shell and related features is disappointing to say the least.

      bending over backwards to accomodate Microsoft-only idio(t)syncrasies

      Baseless bashing. Unix has locales too. It's not Microsoft's fault that the following doesn't work on Windows:

      use open IO => ':locale';
      Microsoft-only ... a self-limiting and very niche environment.

      85% of installations world wide is a strange, some might say blinkered, definition of "niche".