Estrange problem with national chars

Angel Alvarez <>
Fri Jun 11 09:16:43 CEST 2010


Hi

Ive been in trouble trying to display localised messages in spanish.

While inputting strings in utf8 seems fine, every string compile into the code gets garbled. Terminal, text editor and shell are in unicode (utf8)
but i can display messages with strings in spanish.


Anyone can point me on the ritght direcction?

Thanks!!!


/Angel

io:getopts().
[{expand_fun,#Fun<group.0.120017273>},
 {echo,true},
 {binary,false},
 {encoding,unicode}]

-module(mytest).
-compile(export_all).

kk() ->  
	io:format("Test message with in-code spanish chars: cigüeña, camión~n",[]).
kk(Message) ->  
	io:format("Test message with in-code spanish chars: cigüeña, camión and inputted spanish chars: ~s~n",[Message]).

:~/Datos/Personal/Erlang> erl
Erlang R13B01 (erts-5.7.2) [source] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.7.2  (abort with ^G)
1> mytest:kk().
Test message with in-code spanish chars: cigüeña, camión
ok
2> mytest:kk("Atención").
Test message with in-code spanish chars: cigüeña, camión and inputted spanish chars: Atención
ok




-- 
Este correo no tiene dibujos. Las formas extrañas en la pantalla son letras.
__________________________________________

Clist UAH a.k.a Angel
__________________________________________
Evitar la programación defensiva. Manual de Erlang


More information about the erlang-questions mailing list