From: "Skye Shaw!@#$" Date: 2011-01-01T06:25:26+09:00 Subject: Re: From python to ruby On Dec 30, 1:02 am, Alain Matthes wrote: > A question :  with python, I've a the line    # -*- coding: utf-8 -*- > Do Ruby works without problem  with utf8 encoding ? > (I work with Ruby 1.8.7 on OS X.) Given your ruby version you'll be fine until you start using characters with code points > 127 Macintosh:~ $ ruby -e'almoço = "cerveja"; puts almoço' -e:1: Invalid char `\303' in expression -e:1: Invalid char `\247' in expression -e:1: Invalid char `\303' in expression -e:1: Invalid char `\247' in expression -e:1: warning: parenthesize argument(s) for future version Macintosh:~ $ ruby -KUe'almoço = "cerveja"; puts almoço cerveja Otherwise you'll have to set $KCODE (-K) to "U" for utf8 mode.