Re: API proposal: Glib::compose()
- From: Ole Laursen <olau hardworking dk>
- To: gtkmm-list gnome org
- Subject: Re: API proposal: Glib::compose()
- Date: Sat, 20 Jan 2007 17:08:20 +0100
Daniel Elstner <daniel kitta googlemail com> writes:
> Ah yes. This looks pretty cool. It supports conversion of arbitrary
> types to strings by going through an std::wostringstream internally.
> We'd have to investigate whether that is available on all our target
> platforms. Apart from the support for arbitrary types, the API is
> identical to mine (probably because I unconsciously plagiarized his
> interface).
I originally intended the functions to go into Glibmm because
something like this is absolutely necessary for i18n. So feel free to
copy whatever you want. :-)
One gotcha is the use of std::wostringstream instead of
std::ostringstream - the wide version is needed because some
characters might otherwise be truncated, e.g. thousands separator
characters in some languages. I learned this the hard way.
--
Ole Laursen
http://people.iola.dk/olau/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]