LocaleName (Rephrase)

Joakim Schramm joakim at astrocalc.com
Tue Dec 12 19:37:25 CST 2006


Ok,

I have read the kernel document and it doesn't really answer my questions,
actually it adds one :-) or I am uncertain about one thing. It is talking
about 2 different kinds of encoding available, Storage Encoding and I/O
encoding. It then doesn't meantion the latter anymore except telling it's
what get into and out of fields. So althought stays unclear on this point I
assume locale is the I/O encoding?

Then let me rephrase my previous questions and put it in as example of my
database. In my database I store data about almost every City/Town available
on the earth (except for very small places). The bigger part is numeric data
but there is some VarChar fields typically for Town names and countries or
other "labels", then there is 1 DateTime field. The database it set to
Storage Encoding UTF-16.

First, Country and Town names exist in various versions regarding spelling
as they can spell differently in different languages. What I am concerned
about here is that when the database is used on a computer these names will
show as they should be in original language. All I/O controls in my app is
full Unicode aware. Will the locale set in Valentina affect how this is
displayed? I ask because in Vstudio this isn't the case always, but maybe
Vstudio controls isn't Unicode?

When populate data into database I have changed my computers setting to
resamble that country, I have then read the data in by code from unicode
files with correct spelling. So is this "preserved" inside Valentina dispite
change of locale? Or locale has nothing to do with this how characters are
displayed when UTF-16?

Second thing is my DateTime Field, will locale change how it behave or just
how it "look"? Like in VB as an example, dates can be formated differently
but inside VB always use the same format no matter which locale set. What I
do here is typically compare one DateTime value from code with what is
stored in db to find a range of datetime this falls into.

As I do now I only set locale to VarChar field and leave rest as original
which is en_US (or if it en_UK), but setting locale to 1 field with 250 000
records takes 4sec! But maybe Valentina have to traverse all records, then
it's logical. However what I think is maybe I don't have to set locale at
all? Well I am a bit confused about this :-) I don't know exactly how and
what it affect in my db, like if it metetrs if I have UTF-16 whole database.

Regards,
Joakim

> -----Original Message-----
> From: valentina-bounces at lists.macserve.net 
> [mailto:valentina-bounces at lists.macserve.net] On Behalf Of 
> Joakim Schramm
> Sent: 12 December 2006 16:29
> To: 'Valentina Developers'
> Subject: LocaleName
> 
> Hi,
> 
> I was wondering a bit about LocaleName because I set this 
> when I open db and init Tables and Fields, but I noticed it 
> slows down the init considerbly. I wonder what exactly is 
> happening when I set this after I open db, does it have 
> effect at all? I know what "locale" is so no need to explain 
> that for me, but which parts does it exactly affect and how? 
> Currently is adds 3-4 seconds to open and init my db, which 
> is not good.
> 
> Can I set this in a more efficient way, before open or better 
> deliver a db with it set (maybe set it at install) as I 
> understand this actually just must need to be set once and 
> Valentina then remember this?
> 
> I coulden find anything usefull in the docs nor in wikki 
> about it, and remark I don't ask about locale in general but 
> how it works in Valentina.
> 
> /Regards Joakim
> 
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
> 



More information about the Valentina mailing list