Extended maintenance of Ruby 1.9.3 ended on February 23, 2015. Read more
Object
Returns whether self‘s encoding is EUC-JP or not.
# File nkf/lib/kconv.rb, line 263
def iseuc; Kconv.iseuc(self) end
Returns whether self‘s encoding is ISO-2022-JP or not.
# File nkf/lib/kconv.rb, line 275
def isjis; Kconv.isjis(self) end
Returns whether self‘s encoding is Shift_JIS or not.
# File nkf/lib/kconv.rb, line 269
def issjis; Kconv.issjis(self) end
Returns whether self‘s encoding is UTF-8 or not.
# File nkf/lib/kconv.rb, line 281
def isutf8; Kconv.isutf8(self) end
Convert self to to_enc. to_enc and
from_enc are given as constants of Kconv or Encoding objects.
# File nkf/lib/kconv.rb, line 204
def kconv(to_enc, from_enc=nil)
from_enc = self.encoding if !from_enc && self.encoding != Encoding.list[0]
Kconv::kconv(self, to_enc, from_enc)
end
Convert self to EUC-JP
# File nkf/lib/kconv.rb, line 223
def toeuc; Kconv.toeuc(self) end
Convert self to ISO-2022-JP
# File nkf/lib/kconv.rb, line 217
def tojis; Kconv.tojis(self) end
Convert self to locale encoding
# File nkf/lib/kconv.rb, line 253
def tolocale; Kconv.tolocale(self) end
Convert self to Shift_JIS
# File nkf/lib/kconv.rb, line 229
def tosjis; Kconv.tosjis(self) end
Convert self to UTF-16
# File nkf/lib/kconv.rb, line 241
def toutf16; Kconv.toutf16(self) end
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.