mpogue2 / SquareDesk

Fully-featured music player and sequence designer, designed for square dance callers
10 stars 4 forks source link

Bug: Windows encoding strikes again... #172

Open mpogue2 opened 7 years ago

mpogue2 commented 7 years ago

There are still some cue sheets that are not MARKED as windows-1251 encoding, but they include such characters. o-umlaut and funky apostrophes are good examples of this. I think we need something more like this:

if (cuesheet.contains(bad chars like B4, F6)) { try_win1251_encoding(); if (!cuesheet.contains(bad chars)) { use the transcoded one; } else { use the normal one; }

The real problem is that the SqView cue sheets are not in UTF-8. I am hesitant to get in the business of maintaining separate copies of these.

mpogue2 commented 7 years ago

And while we're at it, a lot of the cuesheet filenames themselves contain wacky characters, probably the same issue.

danlyke commented 7 years ago

How hard would it be to put libiconv on Mac and Windows? That'd let us solve all our problems pretty simply...

https://www.gnu.org/software/libiconv/

mpogue2 commented 7 years ago

We already can (and do) transcode. The hard part is detecting what the from encoding is.... If it came from ms word, it tells us. Other times, not so much. Does iconv have a detect function?

danlyke commented 7 years ago

No. I don't think there's a good easy way to detect ISO-8859 vs Windows 1252.

I'll have to look a little deeper at what the files look like...