English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Supporting unicode in ocaml...
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-08-18 (23:37)
From: Jonathan Roewen <jonathan.roewen@g...>
Subject: [Caml-list] Supporting unicode in ocaml...

Does the ocaml team ever plan on supporting unicode to some degree?

What about being able to parse utf-8 encoded files, but keeping the
ascii only grammar? Then with the only change that if it's a utf-8
file, that the utf-8 encoding of string constants are maintained. With
this scheme, you could theoretically bail on non-ascii characters
everywhere else. And a 3rd-party library like camomile could be used
for higher-level processing of the utf8-encoded string constants (from
the camomile docs, utf8 strings use the ocaml string type too).

I must admit that I have no idea how complex even a seemingly small
change like this may be, but at least the detection of the byte order
mark should make it a compatible change...