[V4Rb] Encoding glitch

Charles Yeomans yeomans at desuetude.com
Fri Dec 30 17:17:08 CST 2005


On Dec 30, 2005, at 4:58 PM, Ruslan Zasukhin wrote:

> On 12/30/05 10:03 PM, "Charles Yeomans" <yeomans at desuetude.com> wrote:
>
>>>> If I first convert the encoding of "Valentina’s" to UTF-8, then 
>>>> there
>>>> are no problems.
>>>
>>> But all right then, Charles.
>>>
>>> You need give to V4RB the UTF8 strings.
>>>
>>> It wait for UTF8, if you give something else, why it should work ?
>>
>> Because that's the way REALbasic is designed. It is the responsibility
>> of the called method to handle string encodings.
>
> In general right.
>
> But we avoid test each string on its encoding.

You also avoided documenting this, which cost me some hours of time.

>
> The solution will be (for 2.2 I think) usage of IOEncoding.
>
> Which you can switch and then send/get strings in that encoding you 
> have
> specify.

I think this is a mistake -- depending on what you have in mind for 
IOEncoding -- either you should test for encodings and fit in with 
REALbasic, or you should document that V4Rb expects all strings to be 
UTF-8.

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



More information about the Valentina mailing list