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

Feature request: manually select encoding #72

Open
jack980517 opened this issue Mar 31, 2021 · 5 comments
Open

Feature request: manually select encoding #72

jack980517 opened this issue Mar 31, 2021 · 5 comments

Comments

@jack980517
Copy link

For pages that don't declare an encoding. Safari defaults to the usually-used encoding of the system language; I would like an override.

@opa334
Copy link
Owner

opa334 commented Aug 1, 2021

What do you mean by "encoding", please give an example. Also keep in mind I currently don't have any plans to add new features to Safari Plus.

@jack980517
Copy link
Author

@jack980517
Copy link
Author

https://geolog.mydns.jp/www.geocities.co.jp/Athlete/1000/

Finally found a site that would cause Mojibake. This is an old Japanese site that uses the CP932/Shift-JIS (CP932 is slightly different than Shift-JIS; see Wikipedia) encoding.

To not cause Mojibake while using a non-Unicode encoding, a page should declare a "charset" in a meta tag, like what this page does. (charset=gb2312)

For non-Unicode pages that don't declare a "charset", iOS Safari uses the commonly-used encoding for the current system language, which for English is probably Latin-1 aka ISO-8859-1 or CP1252. Changing the system language to Japanese would allow the geocities page to be decoded correctly.

Because of this behavior, I think there should be code in iOS Safari that determines the encoding to use based on the system language. A tweak should be able to override that and use a different, manually specified encoding.

@jack980517
Copy link
Author

Japanese
English

Screenshots for proof

@jack980517
Copy link
Author

In browsers on PC, manual selection of the text encoding was a standard feature in all browsers (until Chromium removed it in version 55, despite user backlash), and is crucial for East Asian (CJK) users. Mojibake isn't a big problem for languages using the Latin script, as it could be guessed by German speakers that "l鰏chen" is actually "löschen" (not to mention that the entire English alphabet is in ASCII and immune to this problem). However Mojibake in East Asian languages, namely Chinese, Japanese and Korean, renders text entirely unreadable, so manual selection of encodings is necessary. Unless I copy the text and decode it manually, there's no way to read pages affected by Mojibake. I always just close them because it's too troublesome. If manual selection of encodings is added to Safari Plus, I would be able to read those pages easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants