[fpc-devel] _wcsicmp solved

2014-12-04 Thread Adriaan van Os
Is there an RTL or package equivalent for _wcsicmp et all 
 or should the libc declaration be added to 
the application ? Or is there another recommendation to compare wide (so-called Unicode) strings 
case-insensitive ?


Sorry, I found WideCompareText after sending my message.

Regards,

Adriaan van Os


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] _wcsicmp

2014-12-04 Thread Chris Dryburgh

On 04/12/14 07:16 AM, Jonas Maebe wrote:


The closest equivalent is probably sysutils.UnicodeCompareText(). It 
uses CompareStringW on Windows though, and on Unix it converts both 
strings to uppercase, locale-sensitive-wise, and compares those.


As a general rule it is better to convert to lower case before comparing 
Unicode characters. Accents can get lost in conversion to uppercase. 
Accent loss does not happen or is much more rare in conversion to lower 
case.

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] _wcsicmp

2014-12-04 Thread Jonas Maebe


On 04 Dec 2014, at 13:02, Adriaan van Os wrote:

Is there an RTL or package equivalent for _wcsicmp et all  or should the libc declaration be added to the application ? Or is  
there another recommendation to compare wide (so-called Unicode)  
strings case-insensitive ?


The closest equivalent is probably sysutils.UnicodeCompareText(). It  
uses CompareStringW on Windows though, and on Unix it converts both  
strings to uppercase, locale-sensitive-wise, and compares those.



Jonas
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] _wcsicmp

2014-12-04 Thread Adriaan van Os
Is there an RTL or package equivalent for _wcsicmp et all 
 or should the libc declaration be added to 
the application ? Or is there another recommendation to compare wide (so-called Unicode) strings 
case-insensitive ?


Regards,

Adriaan van Os

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel