amake / orgro

An Org Mode file viewer for iOS and Android
https://orgro.org
GNU General Public License v3.0
452 stars 21 forks source link

Support coding systems other than UTF-8 #28

Closed amake closed 3 years ago

amake commented 3 years ago

From an App Store review:

please add chinese-gbk-dos coding system

please add chinese-gbk-dos coding system, or any file with Chinese characters will not assign correctly

Chinese characters work fine if the file is encoded with UTF-8, but it would still be better to be able to handle a variety of encodings.

Also *-dos files should be handled correctly already.

amake commented 3 years ago

I've added encoding auto-detection in v1.12.0. Test builds for Android and iOS are available.

Note, however that the requested GBK is currently only supported on iOS. On Android, support may be coming soon; as soon as it is available I will update Orgro.

BackportVendor commented 3 years ago

@amake Could you please test if this file works fine on iOS? The update has not been shown on the app store. Thanks very much. test_for_non-UTF8.zip

amake commented 3 years ago

I have not released the new version yet; it is available for testing via TestFlight from the link I mentioned above.

Here is a screenshot of the result for the file you supplied:

image

Please note that the auto-detection is heuristic-based; if the Chinese text doesn't occur until later in the file it might not be detected correctly.

BackportVendor commented 3 years ago

Thanks for the prompt reply. That is perfect! All characters and auto detections works well.

amake commented 3 years ago

Thanks for confirmation. I'll submit 1.12.0 for release then.