What does the message “Invalid byte 2 of a 3-byte UTF-8 sequence” mean?

前端 未结 9 621
半阙折子戏
半阙折子戏 2021-01-04 02:41

I changed a file in Orbeon Forms, and the next time I load the page, I get an error message saying Invalid byte 2 of a 3-byte UTF-8 sequence. How can I solve this p

相关标签:
9条回答
  • 2021-01-04 03:09

    I am using Eclipse and I also had to change the Text file encoding in:

    ->Windows->Preferences->Workspace

    Then it worked fine.

    Thanks

    0 讨论(0)
  • 2021-01-04 03:22

    A three byte UTF-8 sequence looks like:

    1110xxxx 10xxxxxx 10xxxxxx
    

    Your error message may mean that the first byte of the three is incorrectly flagging the start of a three byte sequence or else that the second byte is malformed.

    As @avernet says, you need to make sure that all elements in your system are producing and expecting UTF-8.

    0 讨论(0)
  • 2021-01-04 03:26

    I got the same problem in Eclipse, I just tried by changing the file type.

    Right click on file -> Resource -> Text file encoding (UTF-8)

    This solution worked for me.

    Thanks.

    0 讨论(0)
提交回复
热议问题