Value-VarUnicode.xml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
  4. <sect1 id="VARUNICODE">
  5. <title>VARUNICODE</title>
  6. <para><emphasis role="bold">VARUNICODE<indexterm>
  7. <primary>VARUNICODE</primary>
  8. </indexterm><indexterm>
  9. <primary>VARUNICODE value type</primary>
  10. </indexterm>[</emphasis><emphasis>locale</emphasis><emphasis
  11. role="bold">][</emphasis><emphasis>n</emphasis><emphasis
  12. role="bold">]</emphasis></para>
  13. <para>A UTF-16 encoded unicode character string of <emphasis>n</emphasis>
  14. characters, null terminated (not space-padded). The <emphasis>n
  15. </emphasis>may be omitted only when used as a parameter type. The optional
  16. <emphasis>locale </emphasis>specifies a valid unicode locale code, as
  17. specified in ISO standards 639 and 3166 (not needed if LOCALE is specified
  18. on the RECORD structure containing the field definition).</para>
  19. <para>Type casting VARUNICODE to UNICODE, STRING, or DATA is allowed, while
  20. casting to any other type will first implicitly cast to STRING and then cast
  21. to the target value type.</para>
  22. <para>The upper size limit for any VARUNICODE value is 4GB.</para>
  23. <para>Example:</para>
  24. <programlisting>VARUNICODE16 MyUNIString := U'1234567890ABCDEF';
  25. // utf-16-encoded string
  26. VARUNICODE4 MyUnicodeString := U'abcd';
  27. // same as: (UNICODE)'abcd'
  28. VARUNICODE5 MyUnicodeString := U'abcd\353';
  29. // becomes 'abcdë'
  30. VARUNICODE5 MyUnicodeString := U'abcdë';
  31. // same as previous example</programlisting>
  32. </sect1>