V4RB2

erne ernestogiannotta at tiscalinet.it
Fri Oct 22 19:16:45 CDT 2004


on 22-10-2004 13:23, Ruslan Zasukhin at sunshine at public.kherson.ua wrote:

>>>> 4) Locale_Records example
>>>> strings are returned always as UTF-8 even from UTF-16 database
>>>> can't store UTF-16 strings to UTF-16 database
>>> 
>>> They ARE stored in UTF16.
>>> Just with RB we communicate via UTF8
>>> 
>>> Yes, for now V4RB 2.0 beta expect from you UTF8 strings.
>>> This is default of RB, right ?
>>> 
>> 
>> this is default but RB can deal with strings of any encoding
>> so what sense to set a DB.StorageEncoding to UTF16 if I must feed it with
>> UTF8 strings and get back UTF8 from it anyway?
> 
> 1) Right, just for now I have made only UTF8 recognition.
> 
> 2) Erne, do NOT confuse
> 
> a) Storing encoding -- this is how we store on disk
> b) strings between RB <-> V4RB, they can be other encoding.
> although for now UTF8 only
> 
>> It's cool for me since I intend to use UTF8 default
>> 
>> but if I set a StorageEncoding prop to something then I expect to deal with
>> it in that encoding, either input or output
> 
> NO!
> 
> You still can use UTF8. Valentina will convert to StorageEncoding if needed.
> 

this is kind of Valentina to do this for me
but if the string I pass is of undefined encoding
how will Vale know how to deal with that?

>> e.g. this is expected behavior IMO:
> 
>> I have some vCard text from a file known to be UTF16
>> read it in RB with encoding set to UTF16
>> store it in an UTF16 Vale field
> 
> This can be done. And will be done
> 
>> retrieve it from DB
>> Vale passes me an UTF16 string
> 
> Vale will return UTF8 on default.
> 
> Encoding of storing and encoding of I/O this is not the same.
> May be we need some API to be able ask V4RB
> 
> str = fld.GetString( "UTF16" )
> 
>> I write it back to vCard file
> 

Well, I can live with this behaviour
but I still don't get sense of it

what's the point in defining a storing encoding
if I don't I/O data in that format by default?


Cool Runnings,
Erne.
-- 
| e r |  Ernesto Giannotta
| n e |  Musical Box - a media store
                   




More information about the Valentina-beta mailing list