[V4RB] SQL searches for unicode text

jda jda at his.com
Thu Mar 6 08:47:16 CST 2003


While we're waiting for Valentina to support utf8 (hopefully) I've 
followed the suggestion of others and have made my RB 5 fields utf8 
and kept Valentina fields as MacRoman. This works pretty well for 
storing and retrieving (as long as I set DefineEncoding in RB when I 
restore the strings, it works). BUT, I'm having a specific problem 
searching for extended ASCII characters (e.g. an umlauted a (ä)).

To perform a case-insensitive search, I have a method that returns 
the value of each text field in upper case (and I convert my search 
string to upper case before performing the LIKE query). Something 
like this

fieldMethod.SetMethod("Upper(field)")

I suppose that the "upper" method generates an incorrect result when 
applied to two-byte characters (it should, I guess). But it should 
fail in the same way in the search string as in the Valentina method, 
right? So they should still match. But perhaps I have to escape 
characters in such searches?

In any case, for those using Valentina to store unicode text, have 
any of you encountered this, and if so is there a workaround? Of 
course, when Valentina is unicode-savvy, this shouldn't be an issue. 
:->

Thanks,

Jon


More information about the Valentina mailing list