File: qhebrewcodec.3qt

package info (click to toggle)
qt-copy 2%3A3.0.3-20020329-1woody2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 77,328 kB
  • ctags: 59,132
  • sloc: cpp: 413,292; ansic: 88,042; sh: 10,673; yacc: 2,874; xml: 2,310; makefile: 466; lex: 453; perl: 422; sql: 29; lisp: 15
file content (78 lines) | stat: -rw-r--r-- 4,501 bytes parent folder | download | duplicates (2)
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
'\" t
.TH QHebrewCodec 3qt "18 March 2002" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2001 Trolltech AS.  All rights reserved.  See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
QHebrewCodec \- Conversion to and from visually ordered Hebrew
.SH SYNOPSIS
\fC#include <qrtlcodec.h>\fR
.PP
Inherits QTextCodec.
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "virtual const char * \fBmimeName\fR () const"
.br
.ti -1c
.BI "virtual QCString \fBfromUnicode\fR ( const QString & uc, int & len_in_out ) const"
.br
.in -1c
.SH DESCRIPTION
The QHebrewCodec class provides conversion to and from visually ordered Hebrew.
.PP
Hebrew as a semitic language is written from right to left. As older computer systems couldn't handle reordering a string so that the first letter appears on the right, many older documents were encoded in visual order, so that the first letter of a line is the rightmost one in the string.
.PP
Opposed to this, Unicode defines characters to be in logical order (the order you would read the string). This codec tries to convert visually ordered Hebrew (8859-8) to Unicode. This might not always be 100%, as reversing the bidi algorithm that transforms from logical to visual order is non trivial.
.PP
Transformation from Unicode to visual Hebrew (8859-8) is done using the BiDi algorithm in Qt, and will produce correct results, as long as you feed one paragraph of text to the codec at a time. Places where newlines are supposed to start can be indicated by a newline character ('\\n'). Please be aware, that these newline characters change the reordering behaviour of the algorithm, as the BiDi reordering only takes place within one line of text, whereas linebreaks are determined in visual order.
.PP
Visually ordered Hebrew is still used quite often in some places, mainly in email communication (as most email programs still don't understand logically ordered Hebrew) and on web pages. The use on web pages is strongly decreasing however, as there are nowadays a few browsers available that correctly support logically ordered Hebrew.
.PP
This codec has the name "iso8859-8". If you don't want any bidi reordering to happen during conversion, use the" iso8859-8-i" codec, which assumes logical order for the 8bit string.
.PP
See also Internationalization with Qt.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QCString QHebrewCodec::fromUnicode ( const QString & uc, int & len_in_out ) const\fC [virtual]\fR"
Transforms the logically ordered QString, \fIuc\fR, into a visually ordered string in the 8859-8 encoding. Qt's BiDi algorithm is used to perform this task. Please note, that newline characters affect the reordering, as reordering is done on a line by line basis.
.PP
You might get wrong results if you feed the string line by line to this method, as the algorithm is designed to operate on a whole paragraph of text at a time, and the contents of a previous line may affect the reordering of the next line.
.PP
To ensure you get correct results always call this method with an entire paragraph of text to reorder.
.PP
Some encodings (for example japanese or utf8) are multibye (so one input character is mapped to two output characters). The \fIlen_in_out\fR argument specifies the number of QChars that should be converted and is set to the number of characters returned.
.PP
Reimplemented from QTextCodec.
.SH "const char * QHebrewCodec::mimeName () const\fC [virtual]\fR"
Returns the codec's mime name.
.PP
Reimplemented from QTextCodec.

.SH "SEE ALSO"
.BR http://doc.trolltech.com/qhebrewcodec.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com.  See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in
.BR http://doc.trolltech.com/bughowto.html .
Good bug reports help us to help you. Thank you.
.P
The definitive Qt documentation is provided in HTML format; it is
located at $QTDIR/doc/html and can be read using Qt Assistant or with
a web browser. This man page is provided as a convenience for those
users who prefer man pages, although this format is not officially
supported by Trolltech. 
.P
If you find errors in this manual page, please report them to
.BR qt-bugs@trolltech.com .
Please include the name of the manual page (qhebrewcodec.3qt) and the Qt
version (3.0.3).