# Error with special characters(?)

**URL:** <https://www.ruby-forum.com/t/error-with-special-characters/114994>\
**Category:** Rails\
**Created:** [September 19, 2007, 4:01pm UTC](https://www.ruby-forum.com/t/error-with-special-characters/114994 "2007-09-19T16:01:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![crazybass](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/eb9ed0/32.png) [@crazybass](https://www.ruby-forum.com/u/crazybass)\
**Post date:** [September 19, 2007, 4:01pm UTC](https://www.ruby-forum.com/t/error-with-special-characters/114994/1 "2007-09-19T16:01:56Z")

</div>

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
