This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Fix wide char iconv problem on Solaris


>>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr> writes:

Pierre>   The problem with OpenSolaris is that 'wchar_t' is not recognized as
Pierre> a charset name.

Pierre>   The patch below tests
Pierre> 'wchar_t', 'UTF32-LE' and finally host_charset ()
Pierre> as entries for iconv_open.

Unfortunately, I think this approach can't work, because GDB uses things
like iswprint to examine properties of the intermediate wide characters.
So, the actual encoding of these characters matters.

Last time this came up, I dug into Solaris libc a little, and my
conclusion was that there is no fixed wchar_t encoding.  Instead it
varies by locale.  Some of the possible wchar_t encodings appear not to
have any corresponding name.

We could implement this by using the C library wide character conversion
stuff ... but libiconv already does that for us.  My recommendation is
that users who want Solaris to work properly ought to use libiconv, and
we should disable wide character support on Solaris in other cases.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]