Flowdock
method

guess1

Importance_1
v1_8_7_330 - Show latest stable - 0 notes - Class: NKF
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.