23 Apr '13, 6am

@joniburn 1.9系でincompatible character encodings: ISO-2022-JP and UTF-8 (Encoding::CompatibilityError) ダミーエンコーディングらしい。 

open(path, "r:Shift_JIS") {|f| p [f.external_encoding, f.internal_encoding] } #=> [#<Encoding:Shift_JIS>, nil] open(path, "r:Shift_JIS:EUC-JP") {|f| p [f.external_encoding, f.internal_encoding] } #=> [#<Encoding:Shift_JIS>, #<Encoding:EUC-JP>] open(path, "r", :encoding => "Shift_JIS") {|f| p [f.external_encoding, f.internal_encoding] } #=> [#<Encoding:Shift_JIS>, nil] open(path, "r", :encoding => "Shift_JIS:EUC-JP") {|f| p [f.external_encoding, f.internal_encoding] } #=> [#<Encoding:Shift_JIS>, #<Encoding:EUC-JP>] open(path, "r", :external_encoding => "Shift_JIS", :internal_encoding => "EUC-JP") \ {|f| p [f.external_encoding, f.internal_encoding] } #=> [#<Encoding:Shift_JIS>, #<Encoding:EUC-JP>] open(path, "r", :encoding => "Shift_JIS:EUC-JP") do |f| p [f.external_encoding, f.internal_encoding] #=> [#<Encoding:Shift_JIS>, #<Encoding:EUC-JP>] f.set_encoding(nil) p [f.extern...

Full article: http://jp.rubyist.net/magazine/?0025-Ruby19_m17n#l36

Tweets

Animal welfare included in syllabus on building character

Animal welfare included in syllabus on building...

straitstimes.com 21 Apr '13, 11pm

Both primary and secondary students will learn the importance of animal welfare in the new upcoming Character and Citizens...

Character Fact Sheet | Keith - Keith [Mariana’s...

misswishful.com 23 Apr '13, 4am

Her passion for writing has inspired her to write fictitious stories based on influences surrounding her. When she's not b...

Ruby's pessimistic operator (please stop doing ...

robots.thoughtbot.com 24 Apr '13, 8am

December 29, 2010 dancroak bundler gemfile ruby ruby gems semantic versioning software pessimistic operator Ruby’s pessimi...

"Clean code is easier to change, & since change...

pragmaticstudio.com 22 Apr '13, 12am

If you learn Ruby, you can master Rails. Are you using Rails but find yourself getting stuck, or even bogged down? Do you ...

English Name Equivalents for Ruby's Special Var...

rubyinside.com 17 Apr '13, 2pm

English Name Equivalents for Ruby's Special Variables Post by Peter Cooper The English library (used by simply placing req...

#Ruby #programming batch announced. Discounted ...

rubylearning.com 24 Apr '13, 4am

, a participant who just graduated, has to say – “When I joined this course I was sceptical about how useful this course w...

@ahealthydesign @amilum reading a pretty good i...

humblelittlerubybook.com 20 Apr '13, 10pm

Like to write code in a functional style a la Haskell or Scheme? That's cool; Ruby does that. Really dig object orientatio...

Instrumenting Ruby on Rails with TraceView in u...

rubyflow.com 24 Apr '13, 2pm

Instrumenting Ruby on Rails with TraceView in under 10 minutes Posted by pglombardo on April 23, 2013 — 0 comments Setting...