[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2007-04-10 (13:03) |
From: | Gerd Stolpmann <info@g...> |
Subject: | Re: [Caml-list] Variable encoding with netulex |
Am Dienstag, den 10.04.2007, 14:16 +0200 schrieb Till Varoquaux: > I would like to parse a file where the encoding could vary on the fly. > Using Ulex that was quite easy (using form var_enc_channel). What > would be the cannonical way to emulate such a behaviour with netulex? I would say this is not possible. Netulex always reads characters in advance (to improve performance). There is a set_encoding function, but it only affects the next refill (after all read characters are scanned), but it is almost impossible to control when this happens. As the read-ahead buffer was the main motivation to write Netulex, my advice is to stick to plain Ulex. Buffers and encoding changes are hard to get right at the same time. Gerd -- ------------------------------------------------------------ Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de Phone: +49-6151-153855 Fax: +49-6151-997714 ------------------------------------------------------------