albfernandez / juniversalchardet

Originally exported from code.google.com/p/juniversalchardet
Other
333 stars 59 forks source link

Clarify Android compatibility issue #36

Closed amake closed 3 years ago

amake commented 4 years ago

I am looking at using this library in an Android application. In https://github.com/albfernandez/juniversalchardet/commit/84341fde2f5a89f44ecc7df86507c71f6e4f1efb you added a note that 2.1.x and later require Android 8 (SDK 26).

However I successfully tested detection of a Shift-JIS file on an Android 6 device.

Can you give more detail as to what the incompatibility with older Androids is? I found #25 and it seems like the only problem is if you're using files? Does that sound right?

(My use case only needs to deal with raw bytes.)

albfernandez commented 3 years ago

I'm not sure... the error pointed in #25 only happens when calling this method. If you don't use this method (detect charset from a File) then it may work for you.

amake commented 3 years ago

OK, so I guess there hasn't been an analysis of Android compatibility beyond the level of "a crash report came in, so it's not compatible"?

(I don't have any ideas for how to do such an analysis; I'm just curious.)

Incidentally the API I am using (UniversalDetector::detectCharset) is working fine in production on Android 11 for me.

albfernandez commented 3 years ago

OK, so I guess there hasn't been an analysis of Android compatibility beyond the level of "a crash report came in, so it's not compatible"?

(I don't have any ideas for how to do such an analysis; I'm just curious.)

Incidentally the API I am using (UniversalDetector::detectCharset) is working fine in production on Android 11 for me.

Yes, compatibility note is from an crash report.