cancel
Showing results for 
Search instead for 
Did you mean: 

Is the UCA collation algorithm required when using Unicode data?

Breck_Carter
Participant
0 Kudos
2,121

When an application is converted to use Unicode data in the database, is it necessary to change the collation algorithm to UCA?

http://dcx.sybase.com/index.html#1201/en/sachanges/unloading-reloading-upgrading-newjasper.html

Accepted Solutions (0)

Answers (1)

Answers (1)

VolkerBarth
Contributor

AFAIK (but John will know faaaaar better), unicode data will use the UCA collation by default, cf. this quote from the DBINIT docs:

-zn
Specifies the collation sequence used for sorting and comparing of national character data types (NCHAR, NVARCHAR, and LONG NVARCHAR). The collation provides character ordering information for the UTF-8 encoding (character set) being used. Values are UCA (the default), or UTF8BIN which provides a binary ordering of all characters whose encoding is greater than 0x7E. If the dbicu12 and dbicudt12 DLLs are not installed, then the default NCHAR collation is UTF8BIN. For more information, see Choosing collations

So I would conclude that you would not have to change the default collation for (non-unicode) char data.

johnsmirnios
Employee
Employee
0 Kudos

More directly, UCA is not required to use Unicode in the database: you can also use UTF8BIN. The primary difference is in how values sort & compare. For example, you cannot even do accent-insensitve comparisons with UTF8BIN let alone complex linguistically correct sorting.

Breck_Carter
Participant
0 Kudos

@Volker: UCA is the default for -zn, which does not apply in this case because the database has no NCHAR columns. I think dbinit -z is more pertinent in my case.

VolkerBarth
Contributor
0 Kudos

How do you use unicode data when not using NCHAR columns? - Does it mwan you just want to use a linguistically correct collation but store narrow chars? (If so, I misunderstood your requirements...)