Sven Harazim

Hello!

From Windows9x up do XP the following code returns 1 (strings are different)

CompareString(LOCALE_USER_DEFAULT, LINGUISTIC_IGNORECASE, 'HUBNER', Length('HUBNER'),'HUEBNER', Length('HUEBNER'))

String.Compare("HUBNER", "HUEBNER")

Under Vista it returns CSTR_EQUAL

Why

What's different to Vista.

Sven Harazim




Re: General Windows Vista Development Issues CompareString / String.Compare works different on XP - Vista with German "Umlauts" oausOAU

Fred vdP

If you look on this site for the documentation of CompareString :

http://msdn.microsoft.com/library/default.asp url=/library/en-us/winui/winui/windowsuserinterface/resources/strings/stringreference/stringfunctions/comparestring.asp

you'll see Vista adds new behaviour to this function which may explain your difference.
(BTW, nice to see that Vista equates u with ue... provided it does so in German only ;-)




Re: General Windows Vista Development Issues CompareString / String.Compare works different on XP - Vista with German "Umlauts" oausOAU

Sven Harazim

I know this documentation. This behavior is a breaking change to previous Windows and it is not nice. For instance: Muller is'nt allways the same as Mueller in real live.

You find a more detailed discussion about this problem at this microsoft-newsgroup http://groups.google.de/group/microsoft.public.win32.programmer.international/browse_thread/thread/7cb2d1dc29d10d69/a5d4608cc2648ad2#a5d4608cc2648ad2

Sven