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: l10n+unsubscribe@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/l10n/
All messages sent to this list will be publicly archived and cannot be deleted
Context
- [libreoffice-l10n] Re: [libreoffice-users] BASIC StrComp and tricky Unicode (Turkish, for example) SOLVED · Andrew Douglas Pitonyak
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.