VREV Examples
    Ruslan Zasukhin 
    ruslan at paradigmasoft.com
       
    Fri Jul  8 01:08:05 CDT 2005
    
    
  
On 7/7/05 10:55 PM, "Trevor DeVore" <trevor at mangomultimedia.com> wrote:
>> We have parameter IOEncoding although...Hmm.
>> So we in general easy can tell to V4REV that ALL strings it gets are in
>> UTF8..and convert them. We do conversion right now also from char* to
>> utf16.
>> 
>> Interesting idea. We can implement this in few hours...
> 
> I don't think it is a good idea to assume everything is UTF8 since
> usually it is not.
Not assume! Developer will be able set it using
        db.IOEncoding = "UTF8"
> In the examples I showed I was manually converting
> Revolution UTF16 text from a field into UTF8 and then inserting the
> UTF8 data into the database.
 then RevDB always assume it get UTF8 strings?
>I assume that revDB doesn't do any
> manipulation of the string and just passes it to MySQL but I don't know
> for sure.  MySQL then passes it back the UTF8 data untouched so I then
> convert the UTF8 string to UTF16 and assign that to the field for
> display.
Right. The same we can do for OUR API also.
 
> It appears that this technique won't work with V4REV since you are
> converting char* to UTF16 on insert and UTF16 to char* when fetching,
> correct?  Won't this conversion mangle my UTF8 string?
Right now no. but if we add into game
        db.IOEncoding = "UTF8"
Then this can start work.
 
> In the end, if V4REV doesn't allow the developer to pass in Unicode
> text of some sort and get it back out as we passed it in then I don't
> see how we can use it for storing Japanese, Chinese, etc.  Am I missing
> something?
We have not work yet on this problem, because Mark have told that in 2.8
Revolution will allow us use UTF in externals.
Trevor. Everything is simple.
* now Valentina get char* string and think this is MacRoman on mac.,
* if you will change that using
            db.IOEncoding = "UTF8"
Then Valentina will think that each string you give it is UTF8.
I think quite logical.
Of course it is cool if future Revolution will allow us just send wchar_t
-- 
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
    
    
More information about the Valentina-beta
mailing list