I am an inexperienced OСaml coder, so my question may seem trivial.
Recently I tried to add some unicode support to my project (for instance I need to convert Cyrillic characters from uppercase to lowercase and vice versa). I found the impressive Camomile library, which should help me to solve my problems. However I had not found any tutorial or even up-to-date (simple!) examples of the library usage. Would you be so kind to point me to a good introduction to Camomile?
With best regards,
Matvey Morozov
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
I don't know of any good documentation on Camomile, but here is a
code that converts line from terminal to uppercase and lowercase,
assuming that your terminal's encoding is utf8.
===== camotest.ml =====
open Printf
module PREF = CamomileLibrary.Default.Camomile
module CE = PREF.CharEncoding
module CM = PREF.CaseMap.Make(PREF.UTF8)
let _ =
try
while true do printf "> %!";
let line = input_line stdin in
let up = CM.uppercase line
and low = CM.lowercase line
in printf "ORIG : %s\nUPPER: %s\nLOWER: %s\n%!" line up low
done
with
| End_of_file -> ()
===== / camotest.ml =====
$ ocamlfind ocamlc -package camomile -linkpkg camotest.ml -o camotest
$ ./camotest
btw, if you speak russian (as I can guess), you can join the jabber conference
oc...@conference.jabber.ru , some questions are solved faster than via
mail-lists.
I don't know of any good documentation on Camomile, but here is a
code that converts line from terminal to uppercase and lowercase,
assuming that your terminal's encoding is utf8.
===== camotest.ml =====
open Printf
module PREF = CamomileLibrary.Default.Camomile
module CE = PREF.CharEncoding
module CM = PREF.CaseMap.Make(PREF.UTF8)
let _ =
try
while true do printf "> %!";
let line = input_line stdin in
let up = CM.uppercase line
and low = CM.lowercase line
in printf "ORIG : %s\nUPPER: %s\nLOWER: %s\n%!" line up low
done
with
| End_of_file -> ()
===== / camotest.ml =====
$ ocamlfind ocamlc -package camomile -linkpkg camotest.ml -o camotest
$ ./camotest
btw, if you speak russian (as I can guess), you can join the jabber conference
oc...@conference.jabber.ru , some questions are solved faster than via
mail-lists.
_______________________________________________