Subject Re: confused with charset and collation
Author Didier Gasser-Morlay
Peter,

A) thanks a lot for your answer
B) see my questions inline

Didier
--- In firebird-support@yahoogroups.com, "peter_jacobi.rm"
<peter_jacobi@g...> wrote:
> Hi Didier,
>
> "Didier Gasser-Morlay" <Didiergm@n...> wrote:
> > After reading a good deal of post re charset
> > and collation, I am very confused.
>
> This is a good starting point ;-)
>
> In addition I can recommended reading the Unicode and
> Dave's documentation about multi level collation.
>
Where can I find it ? I only find a direct link to ibcollate.

> > Problem 1: I need all of them to query the data with or without
> > accents, and with possibly a combination of upper and lowercase. This
> > is the most pressing issue.
>
> The user enters: "cafe"
>
> And this should match "Cafe", "Café", "CAFE", etc. Is this
> the requirement?
[didier] that's exactly that


> Either you use a nocase-noaccent collation, which isn't in
> the standard FB install, or you use any multi-level collation
> and rewrite the query to "BETWEEN "cafe" AND "cafezzz".
[didier] with that multi-level collation it looks like the query must
be run in lower case isn't it ?

> Both options were discussed in earlier threads.
[Didier] What do you call a multi level collation, I could not find
any ref when searching the group.

Re the non-standard nocase noaccent, I suppose you make a ref to
dave's work at brookstonesystems. I seems that it does not work in fb
1.5 nor on Linux. Both are showstoppers to me as even the construction
kit says it does not work with 1.5.

> > Problem 2: when sorting by that field, I would ideally like to have
> > the sort order case and accent insensitive. If this cannot be
> > achieved, I can probably leave with that.
>
> 2a: Actually, (at least some) users will have different
> expectations about the order the data has to be sorted.
> You can either ignore this and use some common denominator,
> or there must be a configuration or even runtime option to
> account for this complication.
>
> 2b: What do you mean with "sort order case and accent insensitive":
> i) should "CAFE" and "café" be sorted in a random order OR
> ii) should they be sorted next to each other, but in a defined order
> Most multi-level collations will do ii) for you.
[Didier] ii) is perfect

>
> > What is the correct (or best) combination or charset/collation using
> > fb 1.5, Bearing in mind that the database is queried via a delphi
> > application and via a php-based browser front end.
>
> Is the ISO-8859-1 charset large enough of do you need the
> additional characters in CP1252?
>
[didier] with my, hopefully yet, limited understanding I'd say that
ISO-8859-1 is enough

Best regards
and thanks again

> Best Regards,
> Peter Jacobi