Consultor Eletrônico



Kbase P85813: Character 255 'ÿ' (in latin-1 iso8859-1 or 1252) is equal to 'y'
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   6/24/2004
Status: Unverified

SYMPTOM(s):

Character 255 'ÿ' (in latin-1 iso8859-1 or 1252) is equal to 'y'

Character 255 'ÿ' (in latin-1 iso8859-1 or 1252) sorts equal to 'y'

CAUSE:

This is expected behavior and relates to the collation being used.

Basically, any kind of equality match (for example with the INDEX function) uses the collation table defined for the code page being used for the session. This compares the sort weights of the characters, and if the values are the same, then this causes 'ÿ' to equal 'y'.

To verify this look in the file <DLC>\prolang\convmap\8859-1.dat. There is a table in here with the label 'COLLATION-NAME BASIC'. Then there are two tables defined for a case sensitive and case insensitive sort. Now in iso8859-1 'ÿ' is position 255 and 'y' is position 121. Looking at the bottom right hand corner value for both tables (position 255), it can be seen that this value equals the value at position 121. This means for both sorts sequences the letters 'y' and 'ÿ' are the same.

FIX:

Use COMPARE with RAW to check equality, which compares the code page positions and not the collation values. i.e.

COMPARE('ÿ', '=', 'y', 'raw')