From: Pavol Droba (droba_at_[hidden])
Date: 2008-08-27 04:04:15
Martin Lutken wrote:
> Anyone who knows how this could be made possible?
> I suppose I need a locale facet like the std::ctype, but which works for
> UTF-8, and not just for ASCII a-z,A-Z. I guess the information in a table
> like this (http://www.unicode.org/Public/UNIDATA/CaseFolding.txt)
> could be used.
This might not work out-of-the-box. StringAlgo lib is designed around the sequences
od characters. Since UTF-8 have variable character with encoding, algotrithms
in the library would not work as expected.
To make it working, you will need a container with iterators, that will
iterate over meta-characters, not bytes.
> If it's better/easier just to convert the string to UTF-32 before doing case
> insensitive compares, replaces I could live with that.
If you meant UTS-32 and you have a corresponding locale implementation, than
this approach is a viable solution.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk