Ruby install jcode

I am trying to get "jcode" for ruby, but I find "gem install jcode" and it says nothing exists?

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

+3
source share
3 answers

Ruby> = 1.9 does not require jcode, the module for processing japanese strings (EUC / SJIS), since it supports the desired code natively.

This should fix the problem:

require 'jcode' if RUBY_VERSION < '1.9'

but I must say that I did not experience it deeply ...

+7
source

Have you tried simply:

require 'jcode'

?

How this happens, jcode is part of the Ruby standard library.

0
source

. Ruby.

0

Source: https://habr.com/ru/post/1735860/


All Articles