wxString::Lower for any language
Riccardo Cohen
rcohen at articque.com
Tue Jan 15 00:59:20 PST 2008
just a little word to say what I've done. I downloaded the full unicode
table from http://www.unicode.org/Public/UNIDATA/UnicodeData.txt, wrote
a little program to process what I want (in particular get non
diacritics or lowercase for each char) and integrated this in my program.
This is not very difficult and works for all languages and all
plateform, and more : I feel I understand something at last !
Tyushkov Nikolay wrote:
> Hello Vadim Zeitlin
>
> I offer just add a couple functions to wxString additional to Lower and
> Upper
> for example wxString::LowerEx() and wxString::UpperEx()
>
> #ifdef __WIN32__
> void wxString::LowerEx(wxString & data)
> {
> CharLower( data.GetWriteBuf(data.Length()) );
> data.UngetWriteBuf();
> }
> #endif
>
> or even
>
> void wxString::LowerEx(wxString & data)
> {
> #ifdef __WIN32__
> CharLower( data.GetWriteBuf(data.Length()) );
> data.UngetWriteBuf();
> #else
> Lower(data);
> #endif
> }
>
> Small function, but seems it can help a few people to write correct
> applications :)
>
> P.S. Even DialogBlocks has this problem with find&replace a not-latin
> text (for example russian), because used tolower instead CharLower
> under MSW.
>
>> TN> Maybe there are sense to include it to library?
>>
>> It's difficult to say if it's really better to try implementing it
>> ourselves than just using ICU... On one hand, we do want to reduce the
>> number of dependencies. OTOH reimplementing ICU is not much fun and looks
>> rather pointless.
>>
--
Très cordialement,
Riccardo Cohen
-------------------------------------------
Articque
http://www.articque.com
149 av Général de Gaulle
37230 Fondettes - France
tel : 02-47-49-90-49
fax : 02-47-49-91-49
More information about the wx-users
mailing list