Encoding for cross-Platform DB with V4RB 1.x

Charles Yeomans yeomans at desuetude.com
Mon Sep 5 12:12:43 CDT 2005


On Sep 5, 2005, at 11:58 AM, Frank Bitterlich wrote:

> PROBLEM SOLVED!!!!
>
> Not really a "bug" in Valentina; but rather a limitation in the "like" 
> search.
>
> The field in question was filled with all-uppercase letters, and the 
> search used "no_case". The problem here is that the data in the 
> database appears to be stored as MacRoman; so when Valentina gets a 
> query like
>
>    select * from ABC where ADRESSE like 'ü' no_case
>
> it would find any record that contained a lowercase or uppercase "ü" 
> in Windows Latin. But a MacRoman uppercase "Ü" looks like something 
> different in Windows, and that cannot be "lower-cased" (maybe it can, 
> but it wouldn't be the same character that is represented by a 
> lowercase MacRoman "ü" in Windows Latin).
>
> So, how to solve this? Hard to tell. My workaround is to pre-convert 
> the search term to uppercase in RB. But you can't do a real 
> case-insensitive search on arbitrary strings this way. Maybe V4RB 
> should recognize/remember the encoding of the database, and apply the 
> specific case-conversion code; or maybe it should store the data 
> internally in a cross-platform way - UTF8, for example.
>
> Does 2.0 use ITF8 internally?
>

UTF-16, I believe.

--------------
Charles Yeomans



More information about the Valentina mailing list