Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fix to eliminate iconv for android (and other unix-es)
#2
(01-29-2021, 09:07 AM)ZGabrovski@gmail.com Wrote: I had a serious problem with iconv encoding library on Android 10 application developed with LAMW and Indy.
I received SIGEGV Exception with backtrace:

Is it because Indy is using iconv incorrectly on Android?  Or that iconv itself is just buggy on Android?

(01-29-2021, 09:07 AM)ZGabrovski@gmail.com Wrote: So, I took a decision to try to eliminate  libiconv dependancy form indy code.
...
PLease, may I kindly ask you who wants to test if everything is OK?

I will continue to review it more deeply as time permits, but some things I notice so far:

- your copy of IdCompilerDefines.inc and IdGlobal.pas are a little out of sync with Indy's latest code on GitHub.

- your use of {$IF} won't work for Indy, since Indy still supports compiler versions that don't support {$IF}.  But that is minor thing to fix.

- Is the LConvEncoding unit available on all platforms that FPC supports?  If so, it would make sense to just enable it unconditionally when compiling with FPC.  Except, I'm not overly thrilled with the idea of using an intermediate UTF-8 conversion (UTF-16 <-> UTF-8 <-> charset), that just seems like more work, when iconv can handle conversions to/from UTF-16 directly (UTF-16 <-> charset). But, if that is what we have to do to remove the dependancy, so be it. Just hope the performance overhead will be acceptable.

- I'm noticing areas of IdGlobal.pas that use {$IF(N)DEF USE_ICONV} were not updated to account for USE_LCONVENC.

Reply


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

Forum Jump:


Users browsing this thread: 2 Guest(s)