[erlang-questions] Estrange problem with national chars
Angel Alvarez
clist@REDACTED
Wed Jun 23 13:16:53 CEST 2010
Yet the shell doesnt to have this problem:
sinosuke@REDACTED:~> 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> P=fun()-> io:format("Camión~n",[]) end.
#Fun<erl_eval.20.67289768>
2> P().
Camión
ok
3>
what's the diference beetwen eval'ing code and compiled-in code?
/angel
El Miércoles, 23 de Junio de 2010 Hynek Vychodil escribió:
> It's known issue, module source code is assumed Latin1. (There is not
> such thing like use utf8; in perl.)
>
> On Fri, Jun 11, 2010 at 9:16 AM, Angel Alvarez <clist@REDACTED> wrote:
> > 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]).
> >
> > sinosuke@REDACTED:~/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
> >
> > ________________________________________________________________
> > erlang-questions (at) erlang.org mailing list.
> > See http://www.erlang.org/faq.html
> > To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
> >
> >
>
>
>
--
No imprima este correo si no es necesario. El medio ambiente está en nuestras manos.
__________________________________________
Clist UAH a.k.a Angel
__________________________________________
China 'limpia' el Tibet para las Olimpiadas.
More information about the erlang-questions
mailing list