1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/codecs/qrtlcodec.cpp:358 -->
|
---|
3 | <html>
|
---|
4 | <head>
|
---|
5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
6 | <title>QHebrewCodec Class</title>
|
---|
7 | <style type="text/css"><!--
|
---|
8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
9 | a:link { color: #004faf; text-decoration: none }
|
---|
10 | a:visited { color: #672967; text-decoration: none }
|
---|
11 | body { background: #ffffff; color: black; }
|
---|
12 | --></style>
|
---|
13 | </head>
|
---|
14 | <body>
|
---|
15 |
|
---|
16 | <table border="0" cellpadding="0" cellspacing="0" width="100%">
|
---|
17 | <tr bgcolor="#E5E5E5">
|
---|
18 | <td valign=center>
|
---|
19 | <a href="index.html">
|
---|
20 | <font color="#004faf">Home</font></a>
|
---|
21 | | <a href="classes.html">
|
---|
22 | <font color="#004faf">All Classes</font></a>
|
---|
23 | | <a href="mainclasses.html">
|
---|
24 | <font color="#004faf">Main Classes</font></a>
|
---|
25 | | <a href="annotated.html">
|
---|
26 | <font color="#004faf">Annotated</font></a>
|
---|
27 | | <a href="groups.html">
|
---|
28 | <font color="#004faf">Grouped Classes</font></a>
|
---|
29 | | <a href="functions.html">
|
---|
30 | <font color="#004faf">Functions</font></a>
|
---|
31 | </td>
|
---|
32 | <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QHebrewCodec Class Reference</h1>
|
---|
33 |
|
---|
34 | <p>The QHebrewCodec class provides conversion to and from
|
---|
35 | visually ordered Hebrew.
|
---|
36 | <a href="#details">More...</a>
|
---|
37 | <p>All the functions in this class are <a href="threads.html#reentrant">reentrant</a> when Qt is built with thread support.</p>
|
---|
38 | <p><tt>#include <<a href="qrtlcodec-h.html">qrtlcodec.h</a>></tt>
|
---|
39 | <p>Inherits <a href="qtextcodec.html">QTextCodec</a>.
|
---|
40 | <p><a href="qhebrewcodec-members.html">List of all member functions.</a>
|
---|
41 | <h2>Public Members</h2>
|
---|
42 | <ul>
|
---|
43 | <li class=fn>virtual const char * <a href="#mimeName"><b>mimeName</b></a> () const</li>
|
---|
44 | <li class=fn>virtual QCString <a href="#fromUnicode"><b>fromUnicode</b></a> ( const QString & uc, int & lenInOut ) const</li>
|
---|
45 | </ul>
|
---|
46 | <hr><a name="details"></a><h2>Detailed Description</h2>
|
---|
47 |
|
---|
48 |
|
---|
49 |
|
---|
50 |
|
---|
51 | <p> The QHebrewCodec class provides conversion to and from
|
---|
52 | visually ordered Hebrew.
|
---|
53 | <p> Hebrew as a semitic language is written from right to left.
|
---|
54 | Because older computer systems couldn't handle reordering a string
|
---|
55 | so that the first letter appears on the right, many older
|
---|
56 | documents were encoded in visual order, so that the first letter
|
---|
57 | of a line is the rightmost one in the string.
|
---|
58 | <p> In contrast to this, Unicode defines characters to be in logical
|
---|
59 | order (the order you would read the string). This codec tries to
|
---|
60 | convert visually ordered Hebrew (8859-8) to Unicode. This might
|
---|
61 | not always work perfectly, because reversing the <em>bidi</em>
|
---|
62 | (bi-directional) algorithm that transforms from logical to visual
|
---|
63 | order is non-trivial.
|
---|
64 | <p> Transformation from Unicode to visual Hebrew (8859-8) is done
|
---|
65 | using the bidi algorithm in Qt, and will produce correct results,
|
---|
66 | so long as the codec is given the text a whole paragraph at a
|
---|
67 | time. Places where newlines are supposed to go can be indicated by
|
---|
68 | a newline character ('\n'). Note that these newline characters
|
---|
69 | change the reordering behaviour of the algorithm, since the bidi
|
---|
70 | reordering only takes place within one line of text, whereas
|
---|
71 | line breaks are determined in visual order.
|
---|
72 | <p> Visually ordered Hebrew is still used quite often in some places,
|
---|
73 | mainly in email communication (since most email programs still
|
---|
74 | don't understand logically ordered Hebrew) and on web pages. The
|
---|
75 | use on web pages is rapidly decreasing, due to the availability of
|
---|
76 | browsers that correctly support logically ordered Hebrew.
|
---|
77 | <p> This codec has the name "iso8859-8". If you don't want any bidi
|
---|
78 | reordering to happen during conversion, use the "iso8859-8-i"
|
---|
79 | codec, which assumes logical order for the 8-bit string.
|
---|
80 | <p>See also <a href="i18n.html">Internationalization with Qt</a>.
|
---|
81 |
|
---|
82 | <hr><h2>Member Function Documentation</h2>
|
---|
83 | <h3 class=fn><a href="qcstring.html">QCString</a> <a name="fromUnicode"></a>QHebrewCodec::fromUnicode ( const <a href="qstring.html">QString</a> & uc, int & lenInOut ) const<tt> [virtual]</tt>
|
---|
84 | </h3>
|
---|
85 | Transforms the logically ordered <a href="qstring.html">QString</a>, <em>uc</em>, into a visually
|
---|
86 | ordered string in the 8859-8 encoding. Qt's bidi algorithm is used
|
---|
87 | to perform this task. Note that newline characters affect the
|
---|
88 | reordering, since reordering is done on a line by line basis.
|
---|
89 | <p> The algorithm is designed to work on whole paragraphs of text, so
|
---|
90 | processing a line at a time may produce incorrect results. This
|
---|
91 | approach is taken because the reordering of the contents of a
|
---|
92 | particular line in a paragraph may depend on the previous line in
|
---|
93 | the same paragraph.
|
---|
94 | <p> Some encodings (for example Japanese or UTF-8) are multibyte (so
|
---|
95 | one input character is mapped to two output characters). The <em>lenInOut</em> argument specifies the number of QChars that should be
|
---|
96 | converted and is set to the number of characters returned.
|
---|
97 |
|
---|
98 | <p>Reimplemented from <a href="qtextcodec.html#fromUnicode">QTextCodec</a>.
|
---|
99 | <h3 class=fn>const char * <a name="mimeName"></a>QHebrewCodec::mimeName () const<tt> [virtual]</tt>
|
---|
100 | </h3>
|
---|
101 | Returns the codec's mime name.
|
---|
102 |
|
---|
103 | <p>Reimplemented from <a href="qtextcodec.html#mimeName">QTextCodec</a>.
|
---|
104 | <!-- eof -->
|
---|
105 | <hr><p>
|
---|
106 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
---|
107 | Copyright © 1995-2007
|
---|
108 | <a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
---|
109 | <table width=100% cellspacing=0 border=0><tr>
|
---|
110 | <td>Copyright © 2007
|
---|
111 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
112 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
113 | </table></div></address></body>
|
---|
114 | </html>
|
---|