Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby install jcode

Tags:

ruby

utf-8

I'm trying to get 'jcode' for ruby, but I type "gem install jcode" and it says nothing exists?

Does anyone know why? I'm trying to manipulate UTF-8 encoded strings.

like image 436
sanpell Avatar asked Sep 22 '26 05:09

sanpell


1 Answers

Ruby >= 1.9 doesn't require jcode, a module to handle japanese (EUC/SJIS) strings, as it supports unicode natively.

This should fix the problem:

require 'jcode' if RUBY_VERSION < '1.9'

but must say I did not test it deeply...

like image 183
mgodinho Avatar answered Sep 23 '26 20:09

mgodinho



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!