消息“3字节UTF-8序列的无效字节2”是什么意思? [英] What does the message "Invalid byte 2 of a 3-byte UTF-8 sequence" mean?

查看:249
本文介绍了消息“3字节UTF-8序列的无效字节2”是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我更改了Orbeon Forms中的一个文件,下次加载页面时,会收到一条错误消息,表示3字节UTF-8序列的无效字节2 。如何解决这个问题?

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 problem?

推荐答案

当Orbeon Forms读取XML文件并期望使用UTF-8编码,但不知何故文件未正确编码UTF-8。要解决这个问题,请确保:

This happens when Orbeon Forms reads an XML file and expects it to use the UTF-8 encoding, but somehow the file isn't properly encoded in UTF-8. To solve this, make sure that:


  1. 您在文件开头有一个XML声明,表示文件是UTF -8:

  1. You have an XML declaration at the beginning of the file saying the file is in UTF-8:

<?xml version="1.0" encoding="UTF-8" ?>


  • 您的编辑器是XML感知的,因此可以解析XML声明, UTF-8编码。如果您的编辑器不是XML感知的,并且您不想使用其他编辑器,请查找选项或首选项,以便您指定编辑器必须使用UTF-8。

  • Your editor is XML-aware, so it can parse the XML declaration and consequently use the UTF-8 encoding. If your editor isn't XML aware, and you don't want to use another editor, look for an option or preference allowing you to specify that the editor must use UTF-8.

    这篇关于消息“3字节UTF-8序列的无效字节2”是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆