Skip to content

Instantly share code, notes, and snippets.

@yannvery
Last active January 3, 2016 08:09
Show Gist options
  • Save yannvery/8433940 to your computer and use it in GitHub Desktop.
Save yannvery/8433940 to your computer and use it in GitHub Desktop.
When perl fails to encode utf8 on windows env http://www.i18nqa.com/debug/utf8-debug.html
use strict;
use warnings;
use Encode qw( encode decode );
my $code_points = decode('UTF-8', 'é'); # This is a 'é' char
my $cp1252 = encode('cp1252', $code_points);
print $cp1252;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment