This is the mail archive of the
mailing list for the binutils project.
Re: [binutils-owner] Re: RFC: Displaying multibyte symbol names in readelf
> Excuse me, please let me ask a stupid question.
There are no stupid questions, only stupid answers. :-)
> But, I'm not sure if the case that the character encoding in ELF binary
> and that in current (terminal emulator's) locale are matched is common.
> I'm afraid that the mismatched case, like, encoding in binary is UCS2,
> UTF-16 or UTF-32 but the locale is UTF-8 would be popular (I'm not saying
> it's the most popular case).
I agree, this is probably a common case. The patched code does include
a check to see if the multibyte string can be displayed in the current
execution environment. If it cannot then the code falls back on the old
behaviour of displaying the multibyte characters as a sequence of
> According to GCC manual:
> Set the wide execution character set, used for wide string and
> character constants.
> I'm afraid that the constant wide character string in the binary executable
> might be coded by UTF-32 or UTF-16 (I'm not saying it's the most popular case).
> If you have already evaluated the proportions of such mismatched cases,
> please let me know.
Evaluated: yes. Been able to do anything about it: no. It is really up
to the system administrator where the tools are being used to make sure
that they were compiled with the correct character set settings, and
that these settings are then used when the tools are used.