[fpc-pascal] LowerCase vs. UnicodeLowerCase
lacak at zoznam.sk
Wed Oct 5 09:11:51 CEST 2016
I have this simple program (on Windows):
US := 'ÁÉÍ';
writeln(LowerCase(US)); // prints ÁÉÍ
writeln(UnicodeLowerCase(US)); // prints áéí
Why first LowerCase() does nothing while second wroks as expected?
Looking at sources there is UnicodeString version of LowerCase() and in
both cases is called widestringmanager.LowerUnicodeStringProc ...
Aha ... (I got it while writing this email)
There is Lowercase(Const S : UnicodeString) : UnicodeString; also in
System and also in SysUtils !
And LowerCase in SysUtils works only for A-Z while in System works with
writeln(System.LowerCase(US)); // prints áéí
Now I understand what happens, but isn't it bit confusing ?
(as lot of programs has SysUtils in uses clause, so SysUtils version
overrides System version ?)
More information about the fpc-pascal