In 07.2023 (07/dd/2023) I did a select like select lower('ÄÖÜ')
to compare with ‘äöü’ which seemed to work.
In 01.2024 I did the same and it did not work.
Reason is that Umlauts where not converted at all by lower/upper.
Maybe in between version of MBS or Xojo where changed and I know I did some updates to the newest versions.
Anyway, SQLite documentation says that lower/upper do only work for ASCII - the “Ö” is C396 in unicode and is still C396 after lower(‘Ö’).
Any idea how to solve this and make “Ö” and “ö” equal in a comparison?
I tried with like but that didn’t work either.
I tried the newer plugin but got not a ‘correct’ comparison for lower(‘Ö’).
ICUenabled = true; ICUloaded = false; ICUused = false;
Ok, ICUenabled defaults to true but can not load an ICU plugin.
Which one should I use for German umlauts? Any binary/compiled version for download available?
Yes, I have the new plugin from 21.02.2024 (58778KB).
This I try:
if InternalSQLiteLibraryMBS.LoadICU() then
System.DebugLog("ICU not loaded")
else
System.DebugLog("ICU loaded")
end if
System.DebugLog(str(InternalSQLiteLibraryMBS.ICUEnabled) + ";" + str(InternalSQLiteLibraryMBS.ICULoaded) + ";" + str(InternalSQLiteLibraryMBS.ICUUsed))
Which gives:
ICU loaded
True;False;False
var Cmd as new SQLCommandMBS()
var SQL as String
SQL = "select lower('ÄÖÜ')"
Cmd.Connection = me.Conn
Cmd.setCommandText(SQL)
try
Cmd.Execute()
catch re as RuntimeException
System.DebugLog("SQLite3.selectSQL; Command.Execute; " + re.Message + ".")
end try
while Cmd.FetchNext()
System.DebugLog(Cmd.Field(1).asStringValue)
wend
gives: ÄÖÜ
so, it does not work or is not loaded
And is it internal? I have not to use a seperate ICU.dll or something like that?
Ok, found that SQlite must be compiled with that…
Call InternalSQLiteLibraryMBS.use
If InternalSQLiteLibraryMBS.LoadICU() Then
System.DebugLog("ICU not loaded")
Else
System.DebugLog("ICU loaded")
End If
System.DebugLog(Str(InternalSQLiteLibraryMBS.ICUEnabled) + ";" + Str(InternalSQLiteLibraryMBS.ICULoaded) + ";" + Str(InternalSQLiteLibraryMBS.ICUUsed))
Var Cmd As New SQLCommandMBS()
Var SQL As String
SQL = "select lower('ÄÖÜ')"
Dim con As New SQLConnectionMBS
con.Connect(":memory:", "", "", con.kSQLiteClient)
Cmd.Connection = con
Cmd.setCommandText(SQL)
Cmd.Execute()
While Cmd.FetchNext()
System.DebugLog(Cmd.Field(1).asStringValue)
Wend
Without the InternalSQLiteLibraryMBS.use call, you use the macOS SQLite library, not the one included in our plugin!
On Windows a console app doesn’t work. I’ve made some changes, so we have a new plugin for you:
Please copy the
icudt73.dll
icuin73.dll
icuuc73.dll
files from Xojo to the app folder if they are missing.