Module: Rabbit::Converter
- Defined in:
- lib/rabbit/utils.rb
Class Method Summary collapse
- .to_eucjp(str) ⇒ Object
- .to_eucjp_from_utf8(str) ⇒ Object
- .to_utf8(str) ⇒ Object
- .to_utf8_from_eucjp(str) ⇒ Object
Instance Method Summary collapse
Class Method Details
.to_eucjp(str) ⇒ Object
457 458 459 |
# File 'lib/rabbit/utils.rb', line 457 def to_eucjp(str) str.encode(Encoding::EUCJP) end |
.to_eucjp_from_utf8(str) ⇒ Object
465 466 467 |
# File 'lib/rabbit/utils.rb', line 465 def to_eucjp_from_utf8(str) str.encode(Encoding::EUCJP, Encoding::UTF_8) end |
.to_utf8(str) ⇒ Object
453 454 455 |
# File 'lib/rabbit/utils.rb', line 453 def to_utf8(str) str.encode(Encoding::UTF_8) end |
.to_utf8_from_eucjp(str) ⇒ Object
461 462 463 |
# File 'lib/rabbit/utils.rb', line 461 def to_utf8_from_eucjp(str) str.encode(Encoding::UTF_8, Encoding::EUCJP) end |
Instance Method Details
#keep_kcode(new_kcode) ⇒ Object
440 441 442 |
# File 'lib/rabbit/utils.rb', line 440 def keep_kcode(new_kcode) yield end |