1QHebrewCodec(3qt) QHebrewCodec(3qt)
2
3
4
6 QHebrewCodec - Conversion to and from visually ordered Hebrew
7
9 All the functions in this class are reentrant when Qt is built with
10 thread support.</p>
11
12 #include <qrtlcodec.h>
13
14 Inherits QTextCodec.
15
16 Public Members
17 virtual const char * mimeName () const
18 virtual QCString fromUnicode ( const QString & uc, int & lenInOut )
19 const
20
22 The QHebrewCodec class provides conversion to and from visually ordered
23 Hebrew.
24
25 Hebrew as a semitic language is written from right to left. Because
26 older computer systems couldn't handle reordering a string so that the
27 first letter appears on the right, many older documents were encoded in
28 visual order, so that the first letter of a line is the rightmost one
29 in the string.
30
31 In contrast to this, Unicode defines characters to be in logical order
32 (the order you would read the string). This codec tries to convert
33 visually ordered Hebrew (8859-8) to Unicode. This might not always work
34 perfectly, because reversing the bidi (bi-directional) algorithm that
35 transforms from logical to visual order is non-trivial.
36
37 Transformation from Unicode to visual Hebrew (8859-8) is done using the
38 bidi algorithm in Qt, and will produce correct results, so long as the
39 codec is given the text a whole paragraph at a time. Places where
40 newlines are supposed to go can be indicated by a newline character
41 ('\n'). Note that these newline characters change the reordering
42 behaviour of the algorithm, since the bidi reordering only takes place
43 within one line of text, whereas line breaks are determined in visual
44 order.
45
46 Visually ordered Hebrew is still used quite often in some places,
47 mainly in email communication (since most email programs still don't
48 understand logically ordered Hebrew) and on web pages. The use on web
49 pages is rapidly decreasing, due to the availability of browsers that
50 correctly support logically ordered Hebrew.
51
52 This codec has the name "iso8859-8". If you don't want any bidi
53 reordering to happen during conversion, use the "iso8859-8-i" codec,
54 which assumes logical order for the 8-bit string.
55
56 See also Internationalization with Qt.
57
60 const [virtual]
61 Transforms the logically ordered QString, uc, into a visually ordered
62 string in the 8859-8 encoding. Qt's bidi algorithm is used to perform
63 this task. Note that newline characters affect the reordering, since
64 reordering is done on a line by line basis.
65
66 The algorithm is designed to work on whole paragraphs of text, so
67 processing a line at a time may produce incorrect results. This
68 approach is taken because the reordering of the contents of a
69 particular line in a paragraph may depend on the previous line in the
70 same paragraph.
71
72 Some encodings (for example Japanese or UTF-8) are multibyte (so one
73 input character is mapped to two output characters). The lenInOut
74 argument specifies the number of QChars that should be converted and is
75 set to the number of characters returned.
76
77 Reimplemented from QTextCodec.
78
80 Returns the codec's mime name.
81
82 Reimplemented from QTextCodec.
83
84
86 http://doc.trolltech.com/qhebrewcodec.html
87 http://www.trolltech.com/faq/tech.html
88
90 Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
91 license file included in the distribution for a complete license
92 statement.
93
95 Generated automatically from the source code.
96
98 If you find a bug in Qt, please report it as described in
99 http://doc.trolltech.com/bughowto.html. Good bug reports help us to
100 help you. Thank you.
101
102 The definitive Qt documentation is provided in HTML format; it is
103 located at $QTDIR/doc/html and can be read using Qt Assistant or with a
104 web browser. This man page is provided as a convenience for those users
105 who prefer man pages, although this format is not officially supported
106 by Trolltech.
107
108 If you find errors in this manual page, please report them to qt-
109 bugs@trolltech.com. Please include the name of the manual page
110 (qhebrewcodec.3qt) and the Qt version (3.3.8).
111
112
113
114Trolltech AS 2 February 2007 QHebrewCodec(3qt)