1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<fpdoc-descriptions>
<package name="rtl">
<!--
====================================================================
fpwidestring
====================================================================
-->
<module name="fpwidestring">
<short>Native Object Pascal Unicode string support</short>
<descr>
<p>
<var>fpwidestring</var> implements Unicode string support for the Free
Pascal RTL using native Object Pascal routines. It is meant to be used on
operating systems where the operating system does not natively support
Unicode transformations and operations.
</p>
<p>
In general, it is sufficient to include the unit in the uses clause of a
program. The initialization code of the unit will set the Unicode string
manager of the system unit to the object pascal implementation contained in
this unit.
</p>
<p>
This unit needs Unicode collation and character set tables in order to be able to do
its work correctly. These must be registered using the routines of the <link id="unicodedata"/> unit:
the FPC project distributes some Unicode collation data in <var>.bco</var> files which can be loaded
using the <link id="#rtl.unicodedata.LoadCollation">LoadCollation</link> routine.
</p>
<p>
In order for sorting and comparing of strings to work, a collation must be used.
The collation in general depends on the internationalization of the
application. Since the system unit does not know about collations, the
collation must be set in the <var>fpWideString</var> unit using the <link
id="SetActiveCollation"/> function. The collation can be set on a per-thread basis.
</p>
<p>
New threads get <link id="DefaultCollationName"/> as the active collation name.
</p>
<p>
The <file>fpwidestring</file> unit performs conversions between Unicode and
single-byte ansistring conversions (excluding UTF8). Support for various
single-byte encodings are based on the <link id="charset"/> unit.
This unit can be used to load single byte code pages. Various code page units
such as <file>cp895</file>, <file>cp932</file>, <file>cp950</file> are
provided by the "rtl-unicode" package.
</p>
<p>
The <file>fpwidestring</file> requires at least the Default Unicode Collation
Element Table to be registered (called <var>DUCET</var>).
The DUCET encoding is provided by the <file>unicodeducet</file> unit.
More information can be found in the <link id="unicodedata"/> unit.
</p>
</descr>
<seealso>
<link id="cwstring"/>
</seealso>
<element name="unicodedata">
<short>Unicode character and collation data</short>
</element>
<!-- function Visibility: default -->
<element name="SetActiveCollation">
<short>Set the active collation for the current thread.</short>
<descr>
<var>SetActiveCollation</var> sets the collation used in the current thread
of the application. This can be done using the name of the collation
(<var>AName</var>) as registered or
in the <link id="unicodedata"/> unit or using the actual collation data
(<var>ACollation</var>).
</descr>
<errors>
If the collation <var>AName</var> was not found, or <var>ACollation</var> is
nil, then <var>False</var> is returned.
</errors>
<seealso>
<link id="GetActiveCollation"/>
<link id="DefaultCollationName"/>
</seealso>
</element>
<!-- function result Visibility: default -->
<element name="SetActiveCollation.Result">
<short><var>True</var> if the collation was successfully set</short>
</element>
<!-- argument Visibility: default -->
<element name="SetActiveCollation.AName">
<short>Name with which the collation was registered</short>
</element>
<!-- argument Visibility: default -->
<element name="SetActiveCollation.ACollation">
<short>Actual collation data to set as active collation</short>
</element>
<!-- function Visibility: default -->
<element name="GetActiveCollation">
<short>Return the currently active collation for the current thread</short>
<descr>
<p>
<var>GetActiveCollation</var> returns the currently active collation, for
the current thread, as set using the <link id="SetActiveCollation"/> function.
</p>
<p>
New threads get <link id="DefaultCollationName"/> as the active collation name.
The collation can be changed per thread using the <link
id="SetActiveCollation"/> function.
</p>
</descr>
<errors>
None.
</errors>
<seealso>
<link id="SetActiveCollation"/>
<link id="DefaultCollationName"/>
</seealso>
</element>
<!-- function result Visibility: default -->
<element name="GetActiveCollation.Result">
<short>The currently active collation for this thread</short>
</element>
<!-- variable Visibility: default -->
<element name="DefaultCollationName">
<short>Default collation for new threads.</short>
<descr>
<var>DefaultCollationName</var> is the collation name for new threads. It is
empty by default.
</descr>
<seealso>
<link id="SetActiveCollation"/>
<link id="GetActiveCollation"/>
</seealso>
</element>
</module> <!-- fpwidestring -->
</package>
</fpdoc-descriptions>
|