Why does Perl lose foreign characters on Windows input - can this be fixed (if so, how) or is Perl an outdated dinosaur that just can't handle this?

Posted by Alex R on Stack Overflow See other posts from Stack Overflow or by Alex R
Published on 2010-12-24T16:01:46Z Indexed on 2010/12/24 16:53 UTC
Read the original article Hit count: 209

Filed under:
|
|

Note below how ã changes to a

alt text

This is causing me a huge problem as foreign characters show up in URLs, e.g. http://pt.wikipedia.org/wiki/Cão

The OS is Windows 7, 64-bit.

The Perl is:

This is perl 5, version 12, subversion 2 (v5.12.2) built for MSWin32-x64-multi-thread
(with 8 registered patches, see perl -V for more detail)

Copyright 1987-2010, Larry Wall

Binary build 1202 [293621] provided by ActiveState http://www.ActiveState.com
Built Sep  6 2010 22:53:42

Additional update:

To get around my particular problem, I tried using File::Find instead of piped input. The issue actually gets worse: alt text

© Stack Overflow or respective owner

Related posts about perl

Related posts about unicode