Unicode Datatypes

Replication Server supports three Unicode datatypes, unichar(n), univarchar(n), and unitext. Unicode allows you to mix languages from different language groups in the same data server.

The Unicode datatypes behave exactly like their equivalent Replication Server datatypes.
  • unichar –> char

  • univarchar –> varchar

  • unitext –> text

The Unicode datatypes share the syntax and semantics of their equivalent datatypes, except Unicode values are always stored in UTF-16, regardless of the Replication Server default character set. unichar(n) is a fixed-width, non-nullable datatype. univarchar(n) is a variable-width, nullable datatype. For unichar(n) and univarchar(n), use n to specify the number of Unicode characters. unitext is variable-width, nullable datatype.

You can:
  • Replicate unichar(n), univarchar(n), and unitext columns to replicate and standby databases

  • Use unichar(n) and univarchar(n) columns in the primary key of a replication definition

  • Use unichar(n) and univarchar(n) columns as searchable columns in a replication definition and in the where clauses of associated subscriptions and articles

  • Use unichar(n) and univarchar(n) columns as searchable columns in a function replication definition and in the where clauses of associated subscriptions and articles

  • Use unichar(n), univarchar(n), and unitext columns when replicating to or from heterogeneous data servers

In the same way as text:
  • unitext columns cannot be part of the primary key in the replication definition.

  • unitext columns cannot be specified as searchable columns in a replication definition.

  • unitext columns cannot be specified as searchable columns in a function replication definition.

  • unitext datatype cannot be used as a base datatype or a datatype definition or as a source or target of either a column-level or class-level translation.

To correctly replicate the unichar and univarchar columns, the Replication Server must be configured:
RS_charset=utf8

If the Replication Server default character set is not UTF-8, Replication Server can replicate only unichar and univarchar characters in the ASCII-7 code range.