Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-07

utf8 to lowercase?

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin

sometimes it's the simple stuff....

s:='utf8 string with german umlauts'
s2:=AnsiLowerCase(s);

on windows, does not convert the umlauts.

Anyone knows how to do this correctly? (or maybe it depends on the unit used, if there is more than one AnsiLowerCase?)

Martin

Reply by email

dmitry boyarintsev
to Martin

something sluggish, like?

s:='utf8 string with german umlauts';
s2:=UTF8Encode(WideLowerCase(UTF8Decode(s)));

I'd suggest to use WideStrings for the internal processing.

thanks,
dmitry

Reply by email

Maxim Ganetsky
to Martin: sometimes it's the simple stuff.... s:='utf8 string with german umlauts'…

Martin ?????:

Show quoted text 9 lines
sometimes it's the simple stuff.... s:='utf8 string with german umlauts' s2:=AnsiLowerCase(s); on windows, does not convert the umlauts. Anyone knows how to do this correctly? (or maybe it depends on the unit used, if there is more than one AnsiLowerCase?)

IIRC LCLProc unit has UTF8LowerCase/UTF8UpperCase functions.

Best regards, Maxim Ganetsky mailto:

Reply by email