[gtkmm] Announce: version 1.0.4 of ucompose.hpp
- From: Ole Laursen <olau hardworking dk>
- To: gtkmm-list gnome org
- Subject: [gtkmm] Announce: version 1.0.4 of ucompose.hpp
- Date: Mon, 21 Jun 2004 22:44:40 +0200
Hi,
I've had reports of mysterious crashes on a Finnish UTF-8 locale,
which upon investigation turned out to be because ucompose.hpp was
using std::ostringstream which is not wide enough to hold the Finnish
thousands separator in UTF-8 (and so Glibmm was being feed invalid
UTF-8).
So I've now converted it to std::wostringstream instead and relased
version 1.0.4 of my string composition library. You can find it here:
http://www.cs.aau.dk/~olau/compose/
About the string composition library: it is small library (i.e. one
header) which defines a bunch of overloaded functions for allowing
this syntax:
ucompose("The species '%1' has %2 lives.", animal, lives)
-> "The species 'cat' has 9 lives."
It exist because the native C++ construct
std::string lives_str = ...; // some conversion of int lives
"The species '" + animal + "' has " + lives_str + " lives."
is tedious, error-prone, difficult to read and impossible to localise
(which means your translators and foreign users will hate you).
--
Ole Laursen
http://www.cs.aau.dk/~olau/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]