Re: [libcroco-list] Some library user feedback...
- From: "Benjamin Dauvergne" <benjamin dauvergne gmail com>
- To: libcroco-list gnome org
- Subject: Re: [libcroco-list] Some library user feedback...
- Date: Fri, 19 Jan 2007 15:00:14 +0100
Offset wil always be byte based but it will be the beginning of a correct UTF-8 char,
line will be the number of '\n' encountered so far plus one, and line-offset will be the offset of the next
character after the last '\n' or zero. If you substract line-offset from offset you have the column,
in number of bytes if you want.
2007/1/19, Bjoern Hoehrmann <derhoermi gmx net>:
* Benjamin Dauvergne wrote:
>I intend to replace the class cr-input by a new class cr-core-input (the lib
>is gonna be separated into cr-core and cr-semantic in a not so far future),
>that should just handle buffering for performance, position reporting (line,
>byte offset, and byte offset in the line, column is gonna disapear, it is
>not something easily defined with all the strange characters in Unicode) and
>UTF-8 decoding and nothing else.
I am not sure I am parsing this correctly. Could you say again what kind
of position information will be available? Since I'm basically planning
to feed only proper UTF-8 to libcroco, I can do without byte positions,
but I would need character positions and avoid that my library and lib-
croco have a different idea of what a line is.
--
Björn Höhrmann · mailto:bjoern hoehrmann de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 ·
http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
--
Benjamin Dauvergne
PhD Student of the Tropics project
INRIA Sophia-Antipolis - France
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]