Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fix to eliminate iconv for android (and other unix-es)
#5
(01-30-2021, 07:02 AM)ZGabrovski@gmail.com Wrote: I took Indy form Online Package Manager in Lazarus. It is not a proble to update last trunk.

Sounds like OPM needs to be updated then. I thought the OPM maintainer was already keeping Indy in sync with new updates? Oh well, I have just pinged him.

(01-30-2021, 07:02 AM)ZGabrovski@gmail.com Wrote: LconvEncoding should work for all fpc versions.

I'm not so worried about VERSIONS as I am about PLATFORMS. Before I consider incorporating LConvEncoding into Indy for platforms other than Android, I would need to know if it actually works on other platforms besides just 'Nix.

More importantly, what about charsets that LConvEncoding doesn't support? Indy would have to delegate to SOMETHING for them. Looking at the source code for LConvEncoding.pas, it looks like it only implements a handful of Windows-125x, ISO-8859-x, and a few other charsets, nowhere near the number of charsets that iconv implements. It appears that LConvEncoding delegates to iconv for all other charsets. So how is that any different than Indy using iconv? Indy is simply using FPC's own iconv wrapper when compiling with FPC. So I would expect LConvEncoding to crash on charsets other than the ones that it manually implements.

I had considered updating Indy to implement common charsets directly in Indy's code. But that would take time and effort to add, and doesn't address the issue of unsupported charsets, either.

(01-30-2021, 07:02 AM)ZGabrovski@gmail.com Wrote: It is not depend from the way indy call iconv. You call in the same way in 8,9,10. But in 10 it crash.

Indy 8 and 9 did not use iconv at all. Support for iconv is only in Indy 10 (added/updated within the last 10 years). So again, what EXACTLY is crashing? Your earlier trace only provides one useful piece of information ("Cause: null pointer dereference"), but doesn't explain WHERE the null pointer is being used. I would rather see that error fixed if possible, before updating Indy to use a completely different charset library (especially one that will REDUCE functionality.

(01-30-2021, 07:02 AM)ZGabrovski@gmail.com Wrote: I spent two days to recompile libiconv.so with the same NDK that I am using for the application. Nothing. Again crash. 

Did you try debugging into Indy's/iconvenc's source code to figure out where the crash was actually occurring, and under which conditions exacty?

(01-30-2021, 07:02 AM)ZGabrovski@gmail.com Wrote: How indy crash in Android 10 and Lazarus

The only useful thing that came out of that discussion (and as you may notice, I was involved in that discussion), is that FPC's iconvenc unit is not compatible with Android API 28 (Android 9). That is not really an Indy issue, but a FPC issue.

Reply


Messages In This Thread
RE: Fix to eliminate iconv for android (and other unix-es) - by rlebeau - 01-30-2021, 08:12 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)