[erlang-questions] correct terminology for referring to strings
Wed Aug 1 20:42:54 CEST 2012
----- Original Message -----
> From: Richard Carlsson <>
> Ah, but when you say "give as parameter" you mean "pass it a
> string literal from the shell", right? I never said anything about strings
> in the shell - that's a different environment from source files, and as you
> described, the shell nowadays detects your locale and translates UTF-8 console
> input into a string literal containing Unicode code points. This is exactly how
> it would happen in source code as well, if the compiler only knew how to detect
> that a source file is in a different encoding from Latin1. So the compiler is
> really the main thing that needs to be fixed, and then there should be no
> surprises on the encoding level anymore.
How about adding compiler warnings about string literals that do not obey
the designated encoding? (There should then, of course, be multiple possibilities to choose from.)
E.g., "warn if strings not UTF8", "warn if not Latin-1", "warn if not compatible with current locale" ...
If so, it might also be nice to check strings in object files for the same properties,
and perhaps make the shell interpreter complain too.
Or maybe you start your erl or erlc with, say, "--string-encoding=..."
More information about the erlang-questions