Zeki, I think that I managed to sort this out!

I resorted to reading the source code... The short answer is that the application's language setting determines how the compare is done for a case-insensitive compare!

Also, based on what I read in the source code, I figured out how the locale is determined and used. I created a new section in my documentation that shows a few examples and indicates how to change the settings for testing. The actual snippet of code that does this is as follows:

LanguageType eLangType = Application::GetSettings().GetLanguageTag().getLanguageType();
 pTransliterationWrapper->loadModuleIfNeeded( eLangType );
 nRetValue = pTransliterationWrapper->compareString( rStr1, rStr2 );

Yep, it pulls the value from the application language settings, so that if I set that to Turkish for the application, I can test in Turkish.


  Print StrComp("ı", "I", 0)  ' compare Turkish dotless i with upper case i
  Print StrComp("i", "I", 0)  ' compare lower case i to upper case i

returns 0 and 1. If I change back to English US, this evaluates as -1, 0.

I will be pushing a change to my web site shortly, complete with updated code examples (in section 7.3 of OOME) and an explanation.

Thanks to all for the pointers and thanks to Jim Caughran for the exchange that then had me thinking about this.

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php


--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to