Commit 9297dbbe authored by Thorsten Schöning's avatar Thorsten Schöning Committed by Byron Jones

Bug 804093: Fix autodetected charset for windows-1252 encoded content

r=glob,a=LpSolit
parent 508c988e
...@@ -763,12 +763,12 @@ sub detect_encoding { ...@@ -763,12 +763,12 @@ sub detect_encoding {
} }
# Encode::Detect sometimes mis-detects various ISO encodings as iso-8859-8, # Encode::Detect sometimes mis-detects various ISO encodings as iso-8859-8,
# but Encode::Guess can usually tell which one it is. # or cp1255, but Encode::Guess can usually tell which one it is.
if ($encoding && $encoding eq 'iso-8859-8') { if ($encoding && ($encoding eq 'iso-8859-8' || $encoding eq 'cp1255')) {
my $decoded_as = _guess_iso($data, 'iso-8859-8', my $decoded_as = _guess_iso($data, 'iso-8859-8',
# These are ordered this way because it gives the most # These are ordered this way because it gives the most
# accurate results. # accurate results.
qw(iso-8859-7 iso-8859-2)); qw(cp1252 iso-8859-7 iso-8859-2));
$encoding = $decoded_as if $decoded_as; $encoding = $decoded_as if $decoded_as;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment