Consultor Eletrônico



Kbase 18429: I18N. Creating a Word-Break File for International Collation
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   12/17/2004
Status: Verified

FACT(s) (Environment):

Progress 8.x
Progress 9.x
OpenEdge 10

SYMPTOM(s):

QBW syntax error - an asterisk (*) is allowed only at the end of a word. (4686)

Creating a Word-Break File for International Collation

How to create a Word-Break file for International Collation?

FIX:

First find out what kind of collation you are using for the database as follows:


FOR EACH _DB:
DISPLAY _db-xl-name _db-coll-name.
END.
If you have a non basic database and do not get the correct data when you use CONTAINS, the workaround is to create a word-break table, compile it, and apply the break table to the database. Follow these steps:

1) Define/create your own delimiters file.

2) Compile the word-break table with PROUTIL.

3) Apply your word-break rules to your database.

4) Move the word-break file to the DLC directory or reference it with the PROWD environment.

5) Save your own word-break file (an example starts after the following line):


word_attr;
{
91, USE_IT,
92, USE_IT,
93, USE_IT,
94, USE_IT,
95, USE_IT,
96, USE_IT,
123, USE_IT,
124, USE_IT,
192, TERMINATOR,
193, TERMINATOR,
194, TERMINATOR,
195, TERMINATOR,
196, TERMINATOR,
197, TERMINATOR,
198, TERMINATOR,
199, TERMINATOR,
202, TERMINATOR,
206, TERMINATOR,
216, TERMINATOR
}
(The example stops above this line) 6) Go to the working directory where your database and the word-break file (for example, wbreak.txt) are located and run the following command:

proutil dbname -C wbreak-compiler wbreak.txt 14

(A file called proword.14 is now created) 7) To apply this file to your database, first set a PROWD environment with:

SET PROWD14 = c:\work\proword.14 8) Then run the following command:

proutil dbname -C word-rules 14 9) Move the proword.14 file to the DLC directory or continue to use the PROWD14 environment.

Refer to the Progress Programming Handbook, Section 8.11.1, "Word Delimiters", for more information on how to create a word-break table, compile the table, and apply it to a database.

NOTE: The example given in the Progress Version 8.2 documentation is missing commas after the character number and before the word delimiter attribute. Also, be sure to set the environment variable if you do not move the binary rule file (created by compiling the word-break table) to the DLC installation directory.

After you change the word-break rules, it is recommended that you rebuild any word indexes.