How to read UTF8 encoded file using RandomAccessFile?

前端 未结 8 2112
深忆病人
深忆病人 2020-12-06 05:35

I have text file that was encoded with UTF8 (for language specific characters). I need to use RandomAccessFile to seek specific position and read from.

I want rea

8条回答
  •  情深已故
    2020-12-06 06:09

    You aren’t going to be able to go at it this way. The seek function will position you by some number of bytes. There is no guarantee that you are aligned to a UTF-8 character boundary.

提交回复
热议问题