[ragel-users] ragel and encodings

Wil Macaulay wil.macaulay at gmail.com
Thu May 21 15:34:35 UTC 2009


Depends on your platform, but my approach to this problem (on the Mac)
was to detect
the encoding, and convert to UTF-8 before parsing. I also converted
line-endings (\r\n -> \n)
and ensured a newline at the end of the data at the same time.

wil

On Thu, May 21, 2009 at 6:48 AM, Robert Lemmen <robertle at semistable.com> wrote:
> hi folks,
>
> i am writing a machine for a text-based format, but it happens to come
> in different encodings (e.g. iso-8859-1 or utf-8). so the question is
> whether anyone has done somethign like that before and has a good idea
> on how to do the encoding handling in a transparetn way and without
> messing up the error locations?
>
> thanks  robert
>
> --
> Robert Lemmen                               http://www.semistable.com
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iD8DBQFKFTFiS6AOchRbaWYRArCrAKC5sXnTDqdUbgziK0hyOu2I5ef6WACdG0MR
> SSQ7nRuzJJFrXGkbQD+M5as=
> =1Zbb
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> ragel-users mailing list
> ragel-users at complang.org
> http://www.complang.org/mailman/listinfo/ragel-users
>
>




More information about the ragel-users mailing list