Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: Till Varoquaux <till.varoquaux@gmail.com>
Cc: ocaml ml <caml-list@inria.fr>
Subject: Re: [Caml-list] Variable encoding with netulex
Date: Tue, 10 Apr 2007 15:03:43 +0200	[thread overview]
Message-ID: <1176210224.8988.30.camel@localhost.localdomain> (raw)
In-Reply-To: <9d3ec8300704100516x4ea11e69tf871bb5aefd491c@mail.gmail.com>

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
------------------------------------------------------------


      reply	other threads:[~2007-04-10 13:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-10 12:16 Till Varoquaux
2007-04-10 13:03 ` Gerd Stolpmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1176210224.8988.30.camel@localhost.localdomain \
    --to=info@gerd-stolpmann.de \
    --cc=caml-list@inria.fr \
    --cc=till.varoquaux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox