Skip to content

Commit

Permalink
fix encoding for polish strings
Browse files Browse the repository at this point in the history
  • Loading branch information
mpudliszewski committed Oct 28, 2024
1 parent f0dd40c commit 4eaf45c
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 4eaf45c

Please sign in to comment.