Subject Re: confused with charset and collation
Author peter_jacobi.rm
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.

> 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?

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".

Both options were discussed in earlier threads.

> 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.


> 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?

Best Regards,
Peter Jacobi