How string are stored

Robert Brenstein rjb at rz.uni-potsdam.de
Fri Aug 8 11:54:36 CDT 2003


>  >
>>  Will version 2 support encoding properly? In other words, when will I
>>  be finally able to run on a Mac and Valentina will properly handle
>>  fields with windows (iso) encoding?
>
>Now it cannot do this ?

Nop.

>We can read one MAC db files from Windows that contains strings in the
>Windows encoding.

Try to input Windows-encoded German text on a Mac and look at it on 
Windows. Valentina will convert it, although it is wrong in this 
case. Your assuming that input encoding is the same as operating 
system is very simplistic and limiting.

>OR what you mean?

I am bringing back what we discussed on and off over past 2 or 3 
years. I want to be able to, for example, input Windows text on a Mac 
and have it correctly recognized there. An practical scenerio that I 
brought in the past: I have a database that handles lots of text. 
Users are entering, editing, and viewing it through web interface. 
The server is Mac but the web interface passes me iso-encoded text. 
As it is, I need to convert it to Mac encoding before storing and 
then recode it before sending back to web. If I don't do that, 
sorting and searching do not work correctly (for non-ascii texts).

If I could set encoding=iso-8859-1 (western or latin1) and 
language=german and valentina would do searching and sorting 
accordingly, I could skip the decoding/recoding steps. a) For server 
operation every cpu cycle counts although decoding/recoding do not 
steal too much they are still waste of time. b) Current approach 
makes it difficult to handle web pages in non-western encodings.

As we discussed in the past, having both encoding and language 
parameters for fields is a way to support proper text handling in 
various languages. Default could be encoding=auto (the current, 
platform-specific) but one could have encoding=utf8 or utf16 or 
iso-8859-2 (central-european aka latin2) or iso-8859-5 (cyrrilic) or 
chinese...

With your plugin technology in V2, one could self add sort/search 
functions for specific languages and encodings (if you offer to 
support that as plugins).

Robert


More information about the Valentina mailing list