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-19 (12:42)
From: Peter Jolly <peter@j...>
Subject: Re: [Caml-list] Supporting unicode in ocaml...
Jonathan Roewen wrote:
> Yes I did (as if you read closer, I did mention). But being able to
> use actual utf8 rather than manually encoding characters in the string
> is what would be nice. Maybe I just need a script to preprocess
> sources in utf8...

AFAIK, all you need to do is get rid of the BOM, which is redundant in
UTF-8 anyway.  I have no problems at all using UTF-8 encoded string
constants in OCaml, and Camomile's UTF8 module then handles them
seamlessly.  YMMV.

(There is one minor issue, which is that there are legal OCaml
identifiers which become illegal when the file is encoded in UTF-8 --
namely those that use accented letters.)