I am playing more with encodings and having some problems.
I pasted the text below from web pages… when I view the source in
a browser as UTF-8, it appears correct.
But running it gives an error.
I’m sure I’m doing something dumb here, but I can’t see it.
Note that the “encoding” comment is on line 2 of the source…
Thanks,
Hal
encoding: UTF-8
text = <<-EOF
Ein Schauer fat mich, Thrne folgt den Thrnen
Das strenge Herz es fhlt sich mild und weich…
Le coeur a ses raisons, que la raison ne connat point.
O gene umana, per volar s nata,
perch a poco vento cos cadi?
EOF
puts text
bash-3.2$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.4.0]
bash-3.2$
bash-3.2$ ruby try.rb
try.rb:6: invalid multibyte char (US-ASCII)
try.rb:4: syntax error, unexpected $end, expecting tSTRING_CONTENT or
tSTRING_DBEG or tSTRING_DVAR or tSTRING_END
bash-3.2$