diff options
author | Thorsten Schöning <tschoening@am-soft.de> | 2012-11-27 22:50:15 +0800 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2012-11-27 22:50:15 +0800 |
commit | 9297dbbec65903d63fddf5878442c7886e45694c (patch) | |
tree | e48d418f34d30eb8ac35f4323f003e2986145d37 /Bugzilla | |
parent | 508c988e1bd10792eed3d6665832720258c2cd9a (diff) | |
download | bugs-9297dbbec65903d63fddf5878442c7886e45694c.tar bugs-9297dbbec65903d63fddf5878442c7886e45694c.tar.gz bugs-9297dbbec65903d63fddf5878442c7886e45694c.tar.bz2 bugs-9297dbbec65903d63fddf5878442c7886e45694c.tar.xz bugs-9297dbbec65903d63fddf5878442c7886e45694c.zip |
Bug 804093: Fix autodetected charset for windows-1252 encoded content
r=glob,a=LpSolit
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Util.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index 002f30ece..9bdff77f3 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -763,12 +763,12 @@ sub detect_encoding { } # Encode::Detect sometimes mis-detects various ISO encodings as iso-8859-8, - # but Encode::Guess can usually tell which one it is. - if ($encoding && $encoding eq 'iso-8859-8') { + # or cp1255, but Encode::Guess can usually tell which one it is. + if ($encoding && ($encoding eq 'iso-8859-8' || $encoding eq 'cp1255')) { my $decoded_as = _guess_iso($data, 'iso-8859-8', # These are ordered this way because it gives the most # accurate results. - qw(iso-8859-7 iso-8859-2)); + qw(cp1252 iso-8859-7 iso-8859-2)); $encoding = $decoded_as if $decoded_as; } |