Value-Unicode.xml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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="UNICODE">
  5. <title>UNICODE</title>
  6. <para><emphasis role="bold">UNICODE<indexterm>
  7. <primary>UNICODE</primary>
  8. </indexterm>[</emphasis><emphasis>_locale</emphasis><emphasis
  9. role="bold">][</emphasis><emphasis>n</emphasis><emphasis
  10. role="bold">]<indexterm>
  11. <primary>UNICODE value type</primary>
  12. </indexterm></emphasis></para>
  13. <para>A UTF-16 encoded unicode character string of <emphasis>n</emphasis>
  14. characters, space-padded just as STRING is. If <emphasis>n </emphasis>is
  15. omitted, the string is variable length to the size needed to contain the
  16. result of the cast or passed parameter. The optional <emphasis>locale
  17. </emphasis>specifies a valid unicode locale code, as specified in ISO
  18. standards 639 and 3166 (not needed if LOCALE is specified on the RECORD
  19. structure containing the field definition).</para>
  20. <para>Type casting UNICODE to VARUNICODE, STRING, or DATA is allowed, while
  21. casting to any other type will first implicitly cast to STRING and then cast
  22. to the target value type.</para>
  23. <para>Example:</para>
  24. <programlisting>UNICODE16 MyUNIString := U'1234567890ABCDEF';
  25. // utf-16-encoded string
  26. UNICODE4 MyUnicodeString := U'abcd';
  27. // same as: (UNICODE)'abcd'
  28. UNICODE_de5 MyUnicodeString := U'abcd\353';
  29. // becomes 'abcdë' with a German locale
  30. UNICODE_de5 MyUnicodeString := U'abcdë';
  31. // same as previous example</programlisting>
  32. </sect1>