From: Robert Klemme Date: 2008-12-15T19:42:00+09:00 Subject: Re: Accentuated function names 2008/12/15 Jean-baptiste H¨¦tier : > I've started a new project in Ruby. For once, my sourcecode is not in > English, but in French, and I'd like to know if its possible to have > accentuated letters for function names in the sourcecode. > > I have encoded my file in UTF-8 and it is parsed fine on Linux, but on > Windows, I get warnings and errors: > main.rb:16: Invalid char `\303' in expression > > Also, the accents do not display properly in the error messages: > main.rb:34: syntax error, unexpected tFID, expecting '\n' or ';' > def appr©À(R)cie?(voisin) > (instead of "appr¨¦cie?(voisin)") > > Is there a way to specify sourcefile encoding? I could drop the accents > in the source, but they make the code much more readable! IMHO it is generally a good idea to stick with 7 bit ASCII in source code. Also, I would never use my mother tongue for source code, partly because keywords are English anyway (even though Matz is Japanese) and partly because English is the lingua franca of IT. I know, this is not what you wanted to hear. :-) Kind regards robert -- remember.guy do |as, often| as.you_can - without end