Changing character sets in text fields

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Aug 13 20:30:44 CDT 2004


On 8/13/04 7:38 PM, "Ben Rubinstein" <benr_mc at cogapp.com> wrote:

Hi Ben,

>> Again, in Valentina 2.0 we will have much more ways to control this.
>> BTW, now I got idea:
>> We will make 3 parameters for this
>> 
>>   db.StorageEncoding
>>   db.InputEncoding
>>   db.OutputEncoding
>> 
>> Will be supported 170 encodings of the world.
> 
> Will this allow an option which effectively means "I'm putting a stream of
> octets in, I'd like to get the same octets out, regardless of the platform I
> stored on or the platform I retrieved on"?

This letter CC'd to beta list.

Let me describe how I see it.
Correct me if I am wrong somewhere.
Add own ideas! 

1) I believe that all new databases (using Valentina 2.0) must have
   db.StorageEncoding as

        UTF-16   (in the first turn Japan, Korea, ..)
    or  UTF8     (Western languages, Cyrillic, ...)

Valentina 2.0 will allow also specify to keep files on disk in e,g,
    Cyrillic WIN (1251)
    Cyrillic (KOI-8)
    Mac Western
    Latin-1
    ...

But I do not see any strong reason for developers to do this.
Better to use Unicode.


2)  db.InputEncoding and db.OutPutEncoding

* They also can be on default UTF-16 or UTF-8.
    i.e. Developer can simply say:
    I work with UTF16 or UTF8 and that is all.
    any headache. 

* Developer can specify here,
        (and I think few years yet this may be widely used)

   some other encoding. For example:
   I want store info in db files UTF8 encoding, but
   I want do I/o using Latin-1.
    
   Or I want Input in Latin-1 but output in Mac Western

In this case it will work as next,

                   
    input in Latin1         output in Mac Western

     ------------> + ----------------->
                   |
                   |
            +---------------+
            | Vengine use   |
            | always UTF16  |
            +---------------+
                   ^
                   |
                   |
           
            disk file (UTF8)
        

As input/output I mean such functions as

        fld.SetString( "asdfa" )    // Latin1
    s = fld.GetString()             // Mac Western



I think I talk now mainly about C++ SDK.
Because e.g. REALbasic developers now mainly get/set strings in UTF8.

Director MX give to Valentina MacWestern and Latin-1 __always__.


I think above is the most flexible way.
Anybody see what else here can be made as option ?



-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina-beta mailing list