V4RB 1.1 RB 5.5 Some questions about language
Kevin Windham
kevo at gatorgraphics.com
Fri Jun 11 12:44:46 CDT 2004
On Jun 11, 2004, at 3:12 AM, olivier vidal wrote:
> Hi Ruslan and list,
>
> Some questions about language
>
> 1-the property " language " serves only for sortings?
>
> 2 - my software has to work on Mac and PC, in divers western
> languages. EACH customer uses the software on a SINGLE platform (mac
> or pc) and in a SINGLE language. The software does not need to be
> multilingual, he can be sold every time for a precise platform and in
> a precise language.
>
> What is the best way of proceeding? In terms of speed and security ?
>
> Realbasic working now there unicode UTF8, it is necessary to verify
> and to change the coding (e.g. UTF8-> MacRoman or UTF8->
> WindowsLatin1...) before any writing/updating in the valentina
> database ?
> Is it necessary for every reading of a data in Valentina, to re-change
> the coding of the string (e.g. macRoman - > UTF8) so that realbasic
> exploit it correctly?
There is quite a bit of confusion regarding encodings, but basically
there are two methods for dealing with strings that are important.
There is DefineEncoding, and ConvertEncoding.
In your case, I believe you should be using DefineEncoding, *NOT*
ConvertEncoding. DefineEncoding simply tells RB what encoding to use
with your string. It does not modify the bytes in the string.
ConvertEncoding will modify the bytes in the string to change it from
one encoding to another.
So if you are getting data into your app from RB it should be in UTF8
by default. Then you can just stuff it into Valentina as is. Then when
you get the data out of Valentina you simply let RB know that it is
UTF8 by using DefineEncoding. That should be all you need to do. At
least that is my understanding. You should only use ConvertEncoding to
change from one encoding to another, and in the scenario you described,
I don't think you should need to change anything. Just use UTF8 and you
should be fine.
HTH,
Kevin
More information about the Valentina
mailing list