[fpc-devel] Unicode functions
graemeg.lists at gmail.com
Tue Aug 26 08:59:36 CEST 2008
On Tue, Aug 26, 2008 at 12:15 AM, JoshyFun <joshyfun at gmail.com> wrote:
> returns exactly the same string (WinXP FPC 2.2.2), as this functions
> seens to not be implemented right now I started to work in some
> functions for this job at least for the simple cases, this means one
> low case char has one upper case char, which should solve 95% of the
I'm just curious how this works with Unicode characters. I guess the
Unicode website should cover this in detail (though I haven't searched
for it yet). How do you convert from lower to upper case? Is there a
set formula per Unicode Block?
The ASCII (standard English alphabet) is easy. Low char minus 32
decimal = Uppercase char
What do you do for other non-English languages and special characters?
I noticed the "Latin-1 Supplement" block has the same formula as the
standard English alphabet.
ö (u+00F6) -> Ö (u+00D6)
"Latin Extended-A" block doesn't. There the upper and lower characters
are next to each other. ę (u+0119) -> Ę(u+0118)
I can't even imagine how things like Hebrew, Greek etc works.... I
guess the Unicode UpperCase() function could become quite complex.
- Graeme -
fpGUI - a cross-platform Free Pascal GUI toolkit
More information about the fpc-devel