Usage of iconv()
Philip Race
philip.race at oracle.com
Thu Apr 25 18:30:43 UTC 2024
On 4/24/24 4:24 AM, Magnus Ihse Bursie wrote:
> That is a good question. libiconv is used only on macOS and AIX, for a
> few libraries, as you say. I just tried removing -liconv from the
> macOS dependencies and recompiled, just to see what would happen.
> There were three instances for macOS: libsplashscreen, libjdwp and
> libinstrument.
>
>
>
> libsplashscreen uses it in splashscreen_sys.m, where it is used to
> convert the jar file name.
This is called from the launcher, in java.base/share/native/libjli/java.c
>
> libjdwp uses it in utf_util.c, where it is used to convert file name
> and command lines, iiuc.
>
> It is likely that we have similar (but better) ways to convert
> charsets elsewhere in our libraries that can be used instead of
> libiconv. I guess these are not the only two places where a filename
> must be converted from the platform charset to UTF8.
So whatever replacement there might be, it needs to be something that is
available very early in the life of the VM, in fact before there is a VM
running.
-phil.
More information about the core-libs-dev
mailing list