Compiling strings with nonascii chars.

Andy Koppe andy.koppe@gmail.com
Tue Jan 26 09:13:00 GMT 2010


2010/1/25 Ed Keith:
>
> I am trying to build ocaml on cygwin and I hit the following error:
>
>
> make[1]: Entering directory `/usr/src/ocaml-3.08.1/ocamldoc'
> ../ocamlcomp.sh -pp './remove_DEBUG' -I ../parsing -I ../utils -I ../typing -I .
> ./driver -I ../bytecomp -I ../tools -I ../toplevel/ -I ../stdlib -I ../otherlibs
> /str -I ../otherlibs/dynlink -I ../otherlibs/unix -I ../otherlibs/num -I ../othe
> rlibs/graph -warn-error A -c odoc.ml
> File "odoc.ml", line 88, characters 8-9:
> String literal not terminated
> make[1]: *** [odoc.cmo] Error 2
>
>
> The line in question is:
>
>
> let _ = print_DEBUG "Fin du chargement dynamique éventuel"
>
>
> I have done some testing and it looks like I get an error on any string literal which contains non-ascii chars. Is there some flag needed to get gcc to accept non-ascii chars?

The line in question is in OCAML rather than C, so this isn't a gcc
issue. I don't know what ocamlc's non-ASCII support is like, but
generally you need to ensure that your locale setting matches the
encoding of the source files. This might be a case of the source being
encoded in ISO-8859-1 while the compiler tries to interpret it as
UTF-8. Try invoking the build with LANG=C.ISO-8859-1. I'm assuming
you're using Cygwin 1.7?

Andy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list