source: trunk/doc/html/qhebrewcodec.html@ 190

Last change on this file since 190 was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 5.7 KB
Line 
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"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { 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&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;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&nbsp;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
35visually 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 &lt;<a href="qrtlcodec-h.html">qrtlcodec.h</a>&gt;</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&nbsp;QString&nbsp;&amp;&nbsp;uc, int&nbsp;&amp;&nbsp;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
52visually ordered Hebrew.
53<p> Hebrew as a semitic language is written from right to left.
54Because older computer systems couldn't handle reordering a string
55so that the first letter appears on the right, many older
56documents were encoded in visual order, so that the first letter
57of a line is the rightmost one in the string.
58<p> In contrast to this, Unicode defines characters to be in logical
59order (the order you would read the string). This codec tries to
60convert visually ordered Hebrew (8859-8) to Unicode. This might
61not always work perfectly, because reversing the <em>bidi</em>
62(bi-directional) algorithm that transforms from logical to visual
63order is non-trivial.
64<p> Transformation from Unicode to visual Hebrew (8859-8) is done
65using the bidi algorithm in Qt, and will produce correct results,
66so long as the codec is given the text a whole paragraph at a
67time. Places where newlines are supposed to go can be indicated by
68a newline character ('\n'). Note that these newline characters
69change the reordering behaviour of the algorithm, since the bidi
70reordering only takes place within one line of text, whereas
71line breaks are determined in visual order.
72<p> Visually ordered Hebrew is still used quite often in some places,
73mainly in email communication (since most email programs still
74don't understand logically ordered Hebrew) and on web pages. The
75use on web pages is rapidly decreasing, due to the availability of
76browsers that correctly support logically ordered Hebrew.
77<p> This codec has the name "iso8859-8". If you don't want any bidi
78reordering to happen during conversion, use the "iso8859-8-i"
79codec, 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&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;uc, int&nbsp;&amp;&nbsp;lenInOut ) const<tt> [virtual]</tt>
84</h3>
85Transforms the logically ordered <a href="qstring.html">QString</a>, <em>uc</em>, into a visually
86ordered string in the 8859-8 encoding. Qt's bidi algorithm is used
87to perform this task. Note that newline characters affect the
88reordering, since reordering is done on a line by line basis.
89<p> The algorithm is designed to work on whole paragraphs of text, so
90processing a line at a time may produce incorrect results. This
91approach is taken because the reordering of the contents of a
92particular line in a paragraph may depend on the previous line in
93the same paragraph.
94<p> Some encodings (for example Japanese or UTF-8) are multibyte (so
95one input character is mapped to two output characters). The <em>lenInOut</em> argument specifies the number of QChars that should be
96converted 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>
101Returns the codec's mime name.
102
103<p>Reimplemented from <a href="qtextcodec.html#mimeName">QTextCodec</a>.
104<!-- eof -->
105<hr><p>
106This file is part of the <a href="index.html">Qt toolkit</a>.
107Copyright &copy; 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 &copy; 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>
Note: See TracBrowser for help on using the repository browser.