Error with special characters(?)

Hi,

I am having a strange problem.
I have RoR 1.7 installed and a have a HTML page (View) with the folowing
part of code:

<% types = [“AF1”, “ALéEL”, “AE pé”, “CET”]%>

The element of the 2nd index (“AE thé”) is causing me problem. The fact
is since the last letter of the string is a special character (“é”), i
have the following error: (note that i dont have the problem with the
element of index 1 which also have a “é” but not in the last position of
the string.

compile error
./script/…/config/…/app/views/xpto/insertion.rhtml:20: syntax error,
unexpected tCONSTANT, expecting ‘]’
_erbout.concat “\t\t”; types_demandes = [“AF1”, “AL餵EL”, "AE pé ¦quot;,
“CET”]; _erbout.concat “\n”
^
./script/…/config/…/app/views/xpto/insertion.rhtml:20: syntax error,
unexpected $undefined, expecting kEND
_erbout.concat “\t\t”; types_demandes = [“AF1”, “AL餵EL”, "AE pé ¦quot;,
“CET”]; _erbout.concat “\n”
^
./script/…/config/…/app/views/xpto/insertion.rhtml:21: syntax error,
unexpected $undefined, expecting kEND
_erbout.concat “\t\t”; pays = [“Belgique”, “France”, “Luxembourg”];
_erbout.concat “\n”

I tried to find the reason of the problem but i didn’t find it.
I tried to find a solution to correct the problem and the better one i
found is to put 2 spaces after the last letter of this string (one space
is not enought):
“AE pé” becomes "AE pé "

Can anyone help me with that?

thanks
regards

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs