If you ever get an error like this:
invalid multibyte char (US-ASCII)
when running a ruby script with ruby 1.9 containing non ASCII chars like ‘ä’, ‘ü’, ‘ö’ etc changes are good that you forgot to add a
# coding: utf-8
statement at the beginning of the file.
Like this:
Like Loading...
About troessner
I am a Ruby enthusiast currently working for dealvertise in Berlin.
I like dynamic languages in general with a strong focus on Ruby.
Headhunters, don't bother. No, I do NOT want to be a Java architect for a mid-size company in the middle of nowhere.
I probably would love Python if it wouldn't force me to write `self` all over the goddamn place.
I really suck at functional programming. I should have paid more attention at university.
NoSQL is worth the hype. Or is it?
I am a big advocate of Behavior Driven Development. Yes, really.
I tried to love node.js, but in the end, it's still fucking javascript.
I was a devoted SCRUM believer.
I have a deep interest in Erlang but haven't had a chance to really use it.
I try to contribute as much as possible to open source. Right now
I am the maintainer of the transitions gem (https://github.com/troessner/transitions),
the ecircle gem (https://github.com/troessner/ecircle)
and the has_uuid gem (https://github.com/troessner/has_uuid).
Besides that I recently got fascinated with Rubinius and I am trying to
really understand why this works. Furthermore, I have made some rather
petty contributions to Rubinius: https://github.com/rubinius/rubinius/commits/master?author=troessner
You can find most of the code I write on github - https://github.com/troessner
Sometimes I write down stuff on:
http://troessner.wordpress.com/
Great that you posted it. Seems to be a small thing, but it saved me some time googling !
why is it coding: utf-8 and not encoding ?? I tried with encoding which seems to be the convention but it didn’t work..
regards
Martijn
I have no idea unfortunately.:)
thanks a lot Dude !