Hi.
I'm writing Ligtroom plugin, and faced the fact that at least LrStringUtils.upper() and LrStringUtils.lower() doesn't work as expected.
For example for LrStringUtils.upper() documentation says:
Converts a string to uppercase using the operating system's localized case conversion. Unlike the Lua string.upper function, this function properly converts characters outside the 7-bit ASCII space.
In practice: it's not any different from the string.upper() - only characters a-z are properly converted to uppercase.
Here is my test code:
local LrDialogs=import("LrDialogs")
local LrStringUtils=import("LrStringUtils")
local s1=tostring(LrStringUtils.upper("ТеСт-TeSt-óó"))
local s2=tostring(LrStringUtils.upper("тЕсТ-tEsT-óó"))
LrDialogs.message(s1..", "..s2..", "..tostring(s1==s2))
The result is
ТеСт-TEST-óó, тЕсТ-TEST-óó, false
As you can see - only latin characters were converted to uppercase.
Tested under Lightroom Classic v12.1, running on Windows 10 x64 22H2
I can't believe such a thing left unnoticed for so long.
So maybe it's just me missing something...
Can someone test this and confirm?
If this is indeed bug - what's the best way to workaround?
Basically I need to compare file system paths in a case-insensitive manner, and can't find a (working) way to do so without calling external utilities via LrTasks.execute()...