Skip to content

Commit

Permalink
Merge pull request #238 from mpudliszewski/pl-encoding
Browse files Browse the repository at this point in the history
fix encoding for polish strings
  • Loading branch information
AmyrAhmady authored Nov 2, 2024
2 parents 42bf371 + 4eaf45c commit 5b6f654
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src-tauri/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ pub fn decode_buffer(buf: Vec<u8>) -> (String, String) {
{
// Use windows-1251 for various combinations
Encoding::for_label("windows-1251".as_bytes()).unwrap_or(UTF_8)
} else if chardetng_encoding == "windows-1250"
&& (chardet_encoding == "iso-8859-1" || charset_normalizer_encoding == "windows-1251")
{
// Use windows-1250 for various combinations
Encoding::for_label("windows-1250".as_bytes()).unwrap_or(UTF_8)
} else if (chardetng_encoding == "windows-1252" && chardet_encoding == "windows-1251")
|| (chardet_encoding == "iso-8859-1"
&& (charset_normalizer_encoding == "iso-8859-2"
Expand Down

0 comments on commit 5b6f654

Please sign in to comment.