Skip to content

Commit

Permalink
Add windows-1251 encoding to the list of possible encodings
Browse files Browse the repository at this point in the history
Also allow windows1251 and windows1252 (without the dash) to work as
well.
  • Loading branch information
samcv committed Feb 2, 2018
1 parent 902f45f commit c73cb78
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/core/Encoding/Registry.pm
Expand Up @@ -16,7 +16,8 @@ my class Encoding::Registry {
nqp::list("utf8-c8","utf-8-c8"),
nqp::list("utf16","utf-16"),
nqp::list("utf32","utf-32"),
nqp::list("windows-1252")
nqp::list("windows-1252"),
nqp::list("windows-1251")
);
my int $i = -1;
my int $elems = nqp::elems($encodings);
Expand Down
6 changes: 5 additions & 1 deletion src/core/Rakudo/Internals.pm
Expand Up @@ -272,7 +272,11 @@ my class Rakudo::Internals {
'ascii', 'ascii',
'iso-8859-1', 'iso-8859-1',
'windows-1252', 'windows-1252',
# with dash
'windows-1251', 'windows-1251',
# windows without dash
'windows1251', 'windows-1252',
'windows1252', 'windows-1251',
# utf with dash
'utf-8', 'utf8',
'utf-16', 'utf16',
'utf-32', 'utf32',
Expand Down

0 comments on commit c73cb78

Please sign in to comment.