Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text viewer and editor encoding (autodetect) issues #308

Open
stuntsman opened this issue Oct 30, 2020 · 0 comments
Open

text viewer and editor encoding (autodetect) issues #308

stuntsman opened this issue Oct 30, 2020 · 0 comments

Comments

@stuntsman
Copy link

Text file autodetecting is still an issue, my report has been misunderstood earlier in #155

The issue is, that only a few codepages are detected/supported, and others are not detected correctly, see Utils.m:

        NSStringEncoding encodes[] = {
            NSUTF8StringEncoding,
            CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000),
            CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_2312_80),
            CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGBK_95),
            NSUnicodeStringEncoding,
            NSASCIIStringEncoding,
            0,
        };

For many codepages the autodetect fails and gives wrong result. You can try Windows-1250, Windows-1252, ISO-8859-1, ISO-8859-2 or many others. ISO-8859 codepages are widely used in European countries.

File in Windows-1250 encoding (simple single byte codepage):

Screenshot 2020-10-28 18 29 51

Failed autodetect in Seafile:

IMG_4716

Originally posted by @stuntsman in #155 (comment)

@stuntsman stuntsman changed the title This is still an issue, my report has been misunderstood. text viewer and editor encoding (autodetect) issues Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant