|
Boost : |
Subject: [boost] [Locale] Boost.Locale - preliminary code
From: Artyom (artyomtnk_at_[hidden])
Date: 2009-10-31 18:22:42
Hello,
I'm working on Boost.Locale project.
Source code and some basic examples can be found here:
https://cppcms.svn.sourceforge.net/svnroot/cppcms/boost_locale/trunk/
It still lacks of documentation and some features. It is
mostly tested under Linux gcc-4.3 and it seems to work
under MSVC-9 (however I had less tested it).
General description:
====================
Boost.Locale is a library that brings high quality localization facilities
in C++ way. It uses `std::locale`, and `std::locale` facets in order to pro-
vide localization in transparent and C++ aware way to user.
C++ has quite good base for localization via existing C++ locale facets:
`std::num_put`, `std::ctype`, `std::collate` etc.. But they are very limited
and sometimes buggy by design. The support of localization varies between
different operating systems and incompatible between them.
On the other hand, there is great, well debugged, high quality, widely used
ICU library that gives all of the goodies but, it has very old API that mimics
Java behavior, it is completely ignores STL and provides useful API only
for UTF-16 encoded text, ignoring other popular Unicode encodings like UTF-8
and UTF-16, or limited national character sets like Latin1.
Boost.Locale provides the natural glue between C++ locales framework,
iostreams and powerful ICU library in following areas:
- Correct case conversion, case folding and normalization (DONE)
- Collation including support of 4 Unicode collation levels. (DONE)
- Date and time formatting and parsing including support of timezones
and calendars other then Gregorian. (DONE)
- Number formatting, spelling and parsing (DONE)
- Monetary formatting and parsing (DONE)
- Powerful message formatting including support plural forms, using GNU
catalogs. (DONE)
- Character, word, sentence and line-break boundary analysis. (TODO)
- Support of 8-bit character sets like Latin1 and UTF-8 encoded text. (DONE)
- Support of `char`, `wchar_t` and C++0x `char16_t`, `char32_t` strings and
streams. (DONE)
------------------------------------------------------------
FYI,
It is still work in progress but 90% of the job is done.
Please take a look on it --- especially experts in Windows
programming.
I would glad if someone explains me the process of submission
and what should be done for it. I know that it is not yet
Boost ready but it goes fast in this direction.
Best,
Artyom.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk