Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/base.rb
Instance Method Summary collapse
- #to_euc ⇒ Object (also: #euc)
-
#to_uri_encode(nkf_charset = "-e") ⇒ Object
(also: #uri_encode)
- nkf_charset
-
-e:EUC, -w:UTF-8, -s:SJIS(INOF mixiの文字コードはEUC).
- #to_utf8 ⇒ Object (also: #utf8)
Instance Method Details
#to_euc ⇒ Object Also known as: euc
15 16 17 |
# File 'lib/base.rb', line 15 def to_euc NKF.nkf("-e", self) end |
#to_uri_encode(nkf_charset = "-e") ⇒ Object Also known as: uri_encode
- nkf_charset
-
-e:EUC, -w:UTF-8, -s:SJIS(INOF mixiの文字コードはEUC)
21 22 23 |
# File 'lib/base.rb', line 21 def to_uri_encode(nkf_charset = "-e") URI.encode(NKF.nkf(nkf_charset, self)) end |
#to_utf8 ⇒ Object Also known as: utf8
10 11 12 |
# File 'lib/base.rb', line 10 def to_utf8 NKF.nkf("-Lu -d -w", self) end |