# File hexja, line 1310
def inputSHIFT_JIS(uio, isCP932)
  show = Show.new
  cs = isCP932 ? 'CP932' : 'SHIFT_JIS'
  while true
    input_sub_ISO_2022_JP_1(uio, show, isCP932 ? :ascii : :jisRoman)
    
    byte = uio.getc
    break if !byte
    
    if byte < 0x80 || (0xa0 <= byte && byte < 0xe0)
      begin
        show.unicodeLetter([ byte ], to_unicode(cs, [ byte ].pack('C')))
      rescue Iconv::IllegalSequence, Iconv::InvalidCharacter
        show.nonLetter([ byte ], $CHAR_PERIOD)
      end
    else
      nextByte = uio.getc
      if !nextByte
        show.nonLetter([ byte ], $CHAR_PERIOD)
      else
        bytes = [ byte, nextByte ]
        begin
          show.unicodeLetter(bytes, to_unicode(cs, bytes.pack('C*')))
        rescue Iconv::IllegalSequence, Iconv::InvalidCharacter
          show.nonLetter([ byte ], $CHAR_PERIOD)
          uio.ungetc(nextByte)
        end
      end
    end
  end
  show.flush
end