Subject | Re: Firebird and Unicode queries |
---|---|
Author | salisburyproject |
Post date | 2005-02-10T13:48:53Z |
Helen,
sorry for this, but what do you mean by 'introducer syntax or CAST'.
Is this the _UNICODE_FSS syntax you mention above in SQL, or you mean
some casting inside the application code?
Thanks,
Kiril.
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
sorry for this, but what do you mean by 'introducer syntax or CAST'.
Is this the _UNICODE_FSS syntax you mention above in SQL, or you mean
some casting inside the application code?
Thanks,
Kiril.
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
> At 12:49 PM 10/02/2005 +0000, you wrote:encoding
>
> >Helen Borrie wrote:
> >
> > >At 02:19 AM 10/02/2005 +0000, you wrote:
> > >
> > >
> > >
> > >>But what encoding form does UNICODE_FSS use, or rather what
> > >>should I pass to DSQL API functions, UTF-8? That can take up to6 bytes!
> > >>user's keyboard
> > >>
> > >
> > >Don't pass unicode at all. Pass characters - whatever the
> > >mapping throws at the client. The client's lc_ctype settingwill take care
> > >of the UNICODE_FSS conversion if it and the database are set upfor it. If
> > >not, i.e. the database column is fss_unicode but the client anddatabase
> > >are not, you face extra work (introducers or casting) to passthe locale
> > >strings in such a way that the engine is able to do that bridgework.
> > >pass
> > >
> >
> >So if I specify lc_ctype as "UTF-8" I'm safe? (assuming I want to
> >UTF-8 form data of course)the
>
> No!! the lc_ctype should always match the default character set of
> database. Its purpose is to interpret the incoming characters forthe
> database. The only valid entries for lc_ctype are character setnames (or
> aliases) that the database knows about. In turn, the database willonly
> know about character sets that were known to the server when thedatabase
> was created.must use
>
> So, if you choose to set the default character set to be NONE, you
> introducer syntax or CAST with any input you need to store in aFSS_UNICODE
> column in order to reproduce the bridging work that the client'slc_ctype
> does in concert with a database whose default charset matches thatthin you
> lc_ctype. This also applies to any search conditions on those
> columns. (I'm getting frustrated here, trying to find a way to SAY
> this! If you STILL think it means that lc_ctype can be any old
> chooseg, then I'm not getting through...)It knows
>
> You don't have to tell the client what it is getting from the UI.
> that. You only have to tell it what to store or search for, andonly if it
> is storing or searching columns that are not in the defaultcharacter set.
>UNICODE_FSS
> As for 6-byte characters, you *will* have problems with them if
> can't map them to a 3-byte word it recognises. Which particular 6-byte
> codes did you have in mind?
>
> ./hb