source: trunk/src/corelib/codecs/codecs.qdoc@ 624

Last change on this file since 624 was 561, checked in by Dmitry A. Kuminov, 15 years ago

trunk: Merged in qt 4.6.1 sources.

  • Property svn:eol-style set to native
File size: 23.6 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4** All rights reserved.
5** Contact: Nokia Corporation ([email protected])
6**
7** This file is part of the documentation of the Qt Toolkit.
8**
9** $QT_BEGIN_LICENSE:LGPL$
10** Commercial Usage
11** Licensees holding valid Qt Commercial licenses may use this file in
12** accordance with the Qt Commercial License Agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in
14** a written agreement between you and Nokia.
15**
16** GNU Lesser General Public License Usage
17** Alternatively, this file may be used under the terms of the GNU Lesser
18** General Public License version 2.1 as published by the Free Software
19** Foundation and appearing in the file LICENSE.LGPL included in the
20** packaging of this file. Please review the following information to
21** ensure the GNU Lesser General Public License version 2.1 requirements
22** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
23**
24** In addition, as a special exception, Nokia gives you certain additional
25** rights. These rights are described in the Nokia Qt LGPL Exception
26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you have questions regarding the use of this file, please contact
37** Nokia at [email protected].
38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42/*!
43 \group codecs
44 \title Codecs
45 \ingroup groups
46 \brief Codec support in Qt.
47
48 These codecs provide facilities for conversion between Unicode and
49 specific text encodings.
50
51 \generatelist{related}
52*/
53
54/*!
55 \page codec-big5.html
56 \title Big5 Text Codec
57 \ingroup codecs
58
59 The Big5 codec provides conversion to and from the Big5 encoding.
60 The code was originally contributed by Ming-Che Chuang
61 \<[email protected]\> for the Big-5+ encoding, and was
62 included in Qt with the author's permission, and the grateful
63 thanks of the Qt team. (Note: Ming-Che's code is QPL'd, as
64 per an mail to [email protected].)
65
66 However, since Big-5+ was never formally approved, and was never
67 used by anyone, the Taiwan Free Software community and the Li18nux
68 Big5 Standard Subgroup agree that the de-facto standard Big5-ETen
69 (zh_TW.Big5 or zh_TW.TW-Big5) be used instead.
70
71 The Big5 is currently implemented as a pure subset of the
72 Big5-HKSCS codec, so more fine-tuning is needed to make it
73 identical to the standard Big5 mapping as determined by
74 Li18nux-Big5. See \l{http://www.autrijus.org/xml/} for the draft
75 Big5 (2002) standard.
76
77 James Su \<[email protected]\> \<[email protected]\>
78 generated the Big5-HKSCS-to-Unicode tables with a very
79 space-efficient algorithm. He generously donated his code to glibc
80 in May 2002. Subsequently, James has kindly allowed Anthony Fok
81 \<[email protected]\> \<[email protected]\> to adapt the code
82 for Qt.
83
84 \legalese
85 Copyright (C) 2000 Ming-Che Chuang \BR
86 Copyright (C) 2002 James Su, Turbolinux Inc. \BR
87 Copyright (C) 2002 Anthony Fok, ThizLinux Laboratory Ltd.
88
89 Redistribution and use in source and binary forms, with or without
90 modification, are permitted provided that the following conditions
91 are met:
92
93 \list 1
94 \o Redistributions of source code must retain the above copyright
95 notice, this list of conditions and the following disclaimer.
96 \o Redistributions in binary form must reproduce the above copyright
97 notice, this list of conditions and the following disclaimer in the
98 documentation and/or other materials provided with the distribution.
99 \endlist
100
101 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND
102 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
103 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
104 ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
105 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
106 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
107 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
108 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
109 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
110 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
111 SUCH DAMAGE.
112 \endlegalese
113*/
114
115/*!
116 \page codec-big5hkscs.html
117 \title Big5-HKSCS Text Codec
118 \ingroup codecs
119
120 The Big5-HKSCS codec provides conversion to and from the
121 Big5-HKSCS encoding.
122
123 The codec grew out of the QBig5Codec originally contributed by
124 Ming-Che Chuang \<[email protected]\>. James Su
125 \<[email protected]\> \<[email protected]\> and Anthony Fok
126 \<[email protected]\> \<[email protected]\> implemented HKSCS-1999
127 QBig5hkscsCodec for Qt-2.3.x, but it was too late in Qt development
128 schedule to be officially included in the Qt-2.3.x series.
129
130 Wu Yi \<[email protected]\> ported the HKSCS-1999 QBig5hkscsCodec to
131 Qt-3.0.1 in March 2002.
132
133 With the advent of the new HKSCS-2001 standard, James Su
134 \<[email protected]\> \<[email protected]\> generated the
135 Big5-HKSCS<->Unicode tables with a very space-efficient algorithm.
136 He generously donated his code to glibc in May 2002. Subsequently,
137 James has generously allowed Anthony Fok to adapt the code for
138 Qt-3.0.5.
139
140 Currently, the Big5-HKSCS tables are generated from the following
141 sources, and with the Euro character added:
142 \list 1
143 \o \l{http://www.microsoft.com/typography/unicode/950.txt}
144 \o \l{http://www.info.gov.hk/digital21/chi/hkscs/download/big5-iso.txt}
145 \o \l{http://www.info.gov.hk/digital21/chi/hkscs/download/big5cmp.txt}
146 \endlist
147
148 There may be more fine-tuning to the QBig5hkscsCodec to maximize its
149 compatibility with the standard Big5 (2002) mapping as determined by
150 Li18nux Big5 Standard Subgroup. See \l{http://www.autrijus.org/xml/}
151 for the various Big5 CharMapML tables.
152
153 \legalese
154 Copyright (C) 2000 Ming-Che Chuang \BR
155 Copyright (C) 2001, 2002 James Su, Turbolinux Inc. \BR
156 Copyright (C) 2002 WU Yi, HancomLinux Inc. \BR
157 Copyright (C) 2001, 2002 Anthony Fok, ThizLinux Laboratory Ltd.
158
159 Redistribution and use in source and binary forms, with or without
160 modification, are permitted provided that the following conditions
161 are met:
162
163 \list 1
164 \o Redistributions of source code must retain the above copyright
165 notice, this list of conditions and the following disclaimer.
166 \o Redistributions in binary form must reproduce the above copyright
167 notice, this list of conditions and the following disclaimer in the
168 documentation and/or other materials provided with the distribution.
169 \endlist
170
171 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND
172 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
173 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
174 ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
175 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
176 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
177 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
178 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
179 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
180 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
181 SUCH DAMAGE.
182 \endlegalese
183*/
184
185/*!
186 \page codec-eucjp.html
187 \title EUC-JP Text Codec
188 \ingroup codecs
189
190 The EUC-JP codec provides conversion to and from EUC-JP, the main
191 legacy encoding for Unix machines in Japan.
192
193 The environment variable \c UNICODEMAP_JP can be used to
194 fine-tune the JIS, Shift-JIS, and EUC-JP codecs. The \l{ISO
195 2022-JP (JIS) Text Codec} documentation describes how to use this
196 variable.
197
198 Most of the code here was written by Serika Kurusugawa,
199 a.k.a. Junji Takagi, and is included in Qt with the author's
200 permission and the grateful thanks of the Qt team. Here is
201 the copyright statement for that code:
202
203 \legalese
204
205 Copyright (C) 1999 Serika Kurusugawa. All rights reserved.
206
207 Redistribution and use in source and binary forms, with or without
208 modification, are permitted provided that the following conditions
209 are met:
210
211 \list 1
212 \o Redistributions of source code must retain the above copyright
213 notice, this list of conditions and the following disclaimer.
214 \o Redistributions in binary form must reproduce the above copyright
215 notice, this list of conditions and the following disclaimer in the
216 documentation and/or other materials provided with the distribution.
217 \endlist
218
219 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS".
220 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
221 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
222 ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
223 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
224 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
225 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
226 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
227 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
228 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
229 SUCH DAMAGE.
230 \endlegalese
231*/
232
233/*!
234 \page codec-euckr.html
235 \title EUC-KR Text Codec
236 \ingroup codecs
237
238 The EUC-KR codec provides conversion to and from EUC-KR, KR, the
239 main legacy encoding for Unix machines in Korea.
240
241 It was largely written by Mizi Research Inc. Here is the
242 copyright statement for the code as it was at the point of
243 contribution. The subsequent modifications are covered by
244 the usual copyright for Qt.
245
246 \legalese
247
248 Copyright (C) 1999-2000 Mizi Research Inc. All rights reserved.
249
250 Redistribution and use in source and binary forms, with or without
251 modification, are permitted provided that the following conditions
252 are met:
253
254 \list 1
255 \o Redistributions of source code must retain the above copyright
256 notice, this list of conditions and the following disclaimer.
257 \o Redistributions in binary form must reproduce the above copyright
258 notice, this list of conditions and the following disclaimer in the
259 documentation and/or other materials provided with the distribution.
260 \endlist
261
262 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND
263 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
264 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
265 ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
266 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
267 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
268 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
269 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
270 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
271 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
272 SUCH DAMAGE.
273 \endlegalese
274*/
275
276/*!
277 \page codec-gbk.html
278 \title GBK Text Codec
279 \ingroup codecs
280
281 The GBK codec provides conversion to and from the Chinese
282 GB18030/GBK/GB2312 encoding.
283
284 GBK, formally the Chinese Internal Code Specification, is a commonly
285 used extension of GB 2312-80. Microsoft Windows uses it under the
286 name codepage 936.
287
288 GBK has been superseded by the new Chinese national standard
289 GB 18030-2000, which added a 4-byte encoding while remaining
290 compatible with GB2312 and GBK. The new GB 18030-2000 may be described
291 as a special encoding of Unicode 3.x and ISO-10646-1.
292
293 Special thanks to charset gurus Markus Scherer (IBM),
294 Dirk Meyer (Adobe Systems) and Ken Lunde (Adobe Systems) for publishing
295 an excellent GB 18030-2000 summary and specification on the Internet.
296 Some must-read documents are:
297
298 \list
299 \o \l{ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/pdf/GB18030_Summary.pdf}
300 \o \l{http://oss.software.ibm.com/cvs/icu/~checkout~/charset/source/gb18030/gb18030.html}
301 \o \l{http://oss.software.ibm.com/cvs/icu/~checkout~/charset/data/xml/gb-18030-2000.xml}
302 \endlist
303
304 The GBK codec was contributed to Qt by
305 Justin Yu \<[email protected]\> and
306 Sean Chen \<