A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  special characters  sybase-tech-blog


Category: ASE: Datatypes: Character Datatypes

unichar(n)

The term unichar(n) describes a datatype, available in ASE from version 12.5. Like all character datatypes the datatype unichar(n) is also compatible to the ANSI-standard. Values, which can be stored in columns defined with unichar(n), are always of the fixed length n (fixed-length character string). So, independent from the length of the string, the datatype unichar(n) always requires n bytes of storage, with a maximum of 16384 Bytes The exact storage requirement in bytes can be determined using the formula "2 * n".

Usage of the Datatype unichar(n)

The datatype unichar(n) is generally used to store UTF-8 or UTF-16 character sets, i.e. it is used for unicode character sets. The characters to be stored should be of predictable, fixed length (fixed-length character string), which should be defined correspondingly when creating the table.

Note: The datatypes unichar and univarchar are only supported in ASE®, if the default character set of the server is set to UTF-8.

See also:

nchar,
nvarchar,
text,
univarchar(n),
varchar(n).