Skip to content

Commit

Permalink
if MacCyrillic... set it to cp1251, 99% it's wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
AmyrAhmady committed Nov 12, 2023
1 parent 0f62b18 commit 49a1411
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src-tauri/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ pub fn decode_buffer(buf: Vec<u8>) -> String {
// let's just say it's cp1251 if encoding is not detected
// FIXME: find a way to actually detect cp1251 and cp1252 from together

if result.0 == "KOI8-R" && result.1 < 0.7 && result.2 == "Russian" {
if result.0 == "MacCyrillic"
|| (result.0 == "KOI8-R" && result.1 < 0.7 && result.2 == "Russian")
{
str_encoding = "cp1251";
}

Expand Down

0 comments on commit 49a1411

Please sign in to comment.