Tailoring of collation algorithm for control sequences

[email protected] Mon, 10 May 2004 11:06:50 +0200 (MEST)
Newsgroups gmane.comp.lib.icu.general
Message-ID <[email protected]>
Hi!

For a specific project I use a RuleBasedCollator, tailored to sort in
conformance with ENV 13710. This works fine for some months now. However,
now the requirement has popped up optionally to give control sequences,
specifically U0000 a non-zero weight. 

In the original syntax of 14651 this would amount to a tailoring such as:

<UOOOO> IGNORE; IGNORE; IGNORE; <U0000>

(or whatever weight I'd like to assign).

Now, quite aside from the question if this is a terribly sensible thing to
do: How to I express this in the ICU tailoring syntax?

A number of problems: gcc barks at an expression such as & [last tertiary
ignorable] <<< '\u0000' if occuring in a char* (XXXX in \uXXXX must be at
least 0020).

Putting the custom tailoring rules into a file and reading it removes the
gcc problem, of course, but causes ICU to run amock so that the program
needs to be killed. Without the tailoring of 0 the program  works as
expected.

Environment:
ICU-C: 2.6.1
gcc (GCC) 3.3.3
OS: Debian Linux (sid)

I have prepared a small sample program that demonstrates the problem in
isolation and that I can attach, if desired. 




Best regards,

Marc



-- 
NEU : GMX Internet.FreeDSL
Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/dsl