You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qt3/doc/man/man3/qhebrewcodec.3qt

79 lines
4.4 KiB

'\" t
.TH QHebrewCodec 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2007 Trolltech ASA. 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
All the functions in this class are reentrant when Qt is built with thread support.</p>
.PP
\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 & lenInOut ) 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. Because 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
In contrast 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 work perfectly, because reversing the \fIbidi\fR (bi-directional) 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, so long as the codec is given the text a whole paragraph at a time. Places where newlines are supposed to go can be indicated by a newline character ('\\n'). Note that these newline characters change the reordering behaviour of the algorithm, since the bidi reordering only takes place within one line of text, whereas line breaks are determined in visual order.
.PP
Visually ordered Hebrew is still used quite often in some places, mainly in email communication (since most email programs still don't understand logically ordered Hebrew) and on web pages. The use on web pages is rapidly decreasing, due to the availability of browsers 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 8-bit string.
.PP
See also Internationalization with Qt.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QCString QHebrewCodec::fromUnicode ( const QString & uc, int & lenInOut ) 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. Note that newline characters affect the reordering, since reordering is done on a line by line basis.
.PP
The algorithm is designed to work on whole paragraphs of text, so processing a line at a time may produce incorrect results. This approach is taken because the reordering of the contents of a particular line in a paragraph may depend on the previous line in the same paragraph.
.PP
Some encodings (for example Japanese or UTF-8) are multibyte (so one input character is mapped to two output characters). The \fIlenInOut\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-2007 Trolltech ASA, 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.3.8).