Re: g_utf16_to_utf8



On Thu, 23 Apr 2009 09:51:41 -0500
Jonathon Jongsma <jonathon quotidian org> wrote:
> 
> Fabrício Godoy wrote:
> > Can I file a bug? Seems that this function is not wrapped.
> 
> Yes, please file bugs if there are things that are not wrapped
 
I believe this is deliberate, and not a bug.  The problem is that the
characters held by std::wstring are not required by the standard to have
any particular size.  std::wstring may, or may not, be suitable for
utf-16 (or utf-32/usc4) and even if it is, there is no wide character
string object for utf-16 analogous to Glib::ustring.  (Windows
std::wstring would hold a utf-16 string without complaining but would
not provide character access functions equivalent to those provided by
Glib::usting; std::wstring in any *nix I have seen would not even hold
the utf16 string.)

It is not really about whether g_utf16_to utf8() should be wrapped, but
what you put it in.  If it is to be wrapped, you are probably going to
end up wrapping it for windows systems only, and you are going to have
to provide a new Glib::ustring16 object (or whatever you choose to call
it). I don't know any other examples of partial (windows-only)
implementations of that kind in glibmm.

If the OP is to file a bug it would be sensible for him to explain how
he proposes this should be dealt with.

Chris



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]