Flowdock
method

guess1

Importance_1
Ruby latest stable (v1_9_3_392) - 0 notes - Class: NKF

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_8_7_330) is shown here.

guess1(p1) public

Returns guessed encoding of str as integer.

Algorithm described in: Ken Lunde. `Understanding Japanese Information Processing’ Sebastopol, CA: O’Reilly & Associates.

case NKF.guess1(input)
when NKF::JIS
  "ISO-2022-JP"
when NKF::SJIS
  "Shift_JIS"
when NKF::EUC
  "EUC-JP"
when NKF::UNKNOWN
  "UNKNOWN(ASCII)"
when NKF::BINARY
  "BINARY"
end
Show source
Register or log in to add new notes.