How to send utf8 data to remote computer in ruby 1.9.2

For me the current situation with encoding in ruby 1.9 looks like
a bad joke.

I believe, if there will be no fix for it, next time the advice
may sound like "don't use Ruby, use Scala, Node.js or
something other"

I did not make the original comment, however the Encoding situation in
1.9 is still the reason why I have not moved to 1.9.

I love ruby but I don't know if I will use 1.9. I am too lazy to deal
with all the Encoding stuff, especially as I myself simply do not need
the Encoding at all.

I use Ruby as a replacement over PHP and Perl.

Perhaps one day I find an easy way to walk over with all my äöü Umlauts
in my .rb files but until that day comes, Ruby 1.9.x just complains
about it, and I couldn't care less if it does. I don't know to which
other language I will move, Ruby spoiled me. :frowning:

I am only glad ruby 1.8.x still works and I will probably end up using
it as long as possible before I will either eventually switch to another
language or somehow learn to deal with the Encoding crap.

···

--
Posted via http://www.ruby-forum.com/\.

Sorry, Marc, but to me it sounds like you just assumed it won't work
without even trying. (And you're part of the reason why everybody has
to wiggle their code around Ruby 1.8 compatibility instead of just
using new features.)

I can't tell why Ruby barfs over your umlauts, since you didn't bother
to write anything about it, but have you tried adding the "# coding:
utf-8" line at the top of your .rb files and actually saving them as
UTF? Have you also tried setting default internal encoding, or setting
encoding explicitly when reading/writing files, if that's what didn't
work for you? Really, making all your (simple) scripts compatible with
1.9 is two lines of code.

···

2011/8/18 Marc Heiler <shevegen@linuxmail.org>:

I did not make the original comment, however the Encoding situation in
1.9 is still the reason why I have not moved to 1.9.

I love ruby but I don't know if I will use 1.9. I am too lazy to deal
with all the Encoding stuff, especially as I myself simply do not need
the Encoding at all.

I use Ruby as a replacement over PHP and Perl.

Perhaps one day I find an easy way to walk over with all my äöü Umlauts
in my .rb files but until that day comes, Ruby 1.9.x just complains
about it, and I couldn't care less if it does. I don't know to which
other language I will move, Ruby spoiled me. :frowning:

I am only glad ruby 1.8.x still works and I will probably end up using
it as long as possible before I will either eventually switch to another
language or somehow learn to deal with the Encoding crap.