imsmanifest.xml 应该是 utf-8 或不是 (Scorm 1.2)
我应该以 UTF-8 还是 ANSI 保存 imsmanifest.xml ?
ADL 测试套件 1.2 似乎因 UTF8 标头而失败,但另一方面,如果不是 UTF8,某些 LMS 也会失败。
Should I save imsmanifest.xml in UTF-8 or ANSI ?
ADL test suite 1.2 seem to fail with UTF8 header, but on otherhand some LMSes will fail if its not UTF8.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
UberAlex 是正确的。 SCORM 将其留给 XML 解析器。 SCORM 只是说它需要是有效的 XML。如果您在使用 XML 解析器时遇到错误,请确保您用来编辑和保存清单的工具实际上使用您指定的相同编码对文档进行编码。如果您指定文档为 UTF-8,但编辑器将其保存为 ASCII,您可能会遇到问题。
另请注意,在 SCORM 的运行时部分中,字符被编码为 ISO 10646(或 unicode)。由于清单中的某些数据可以输入到运行时,请确保您的字符串与 ISO 10646 兼容另外
,请确保所有 URL、文件路径和参数字符串均已正确编码以供 HTTP 使用。
UberAlex is correct. SCORM leaves it up to the XML parser. SCORM merely says that it needs to be valid XML. If you are getting errors with XML parsers, make sure that the tool you are using to edit and save your manifest actually encodes the document using the same encoding that you specify. If you specify that the document is UTF-8, but the editor saves it as ASCII you can run into problems.
Also of note, in the run-time portion of SCORM, the characters are encoded as ISO 10646 (or, unicode. Since some data in the manifest can feed in to the run-time, ensure that your strings will be compatible with ISO 10646.
Also, make sure that any URLs, file paths and parameter strings are properly encoded for HTTP use.
这是不一致的。我认为最好的方法是使用 UTF-8 并确保它在 xml 标头中显式声明。如果你查看定义文件
http://www.scorm .com/scorm-explained/technical-scorm/content-packaging/xml-schema-definition-files/ 有些是 UTF-8,有些不描述编码。
指南中似乎也没有提到编码
http://www.adlnet.gov/Technologies/scorm/ SCORMSDocuments/SCORM%20Resources/ADLGuidelines_V1PublicComment.zip
我想这个问题应该在下面的层处理,即使用xml解析器。我能给出的唯一建议是向 xml 标头添加显式编码信息,并确保它们一致 - 在文本编辑器中打开文件并确保它是 UTF-8。
编辑:标题应该类似于:
It's inconsistent. I think the best approach is to use UTF-8 and make sure it's explicitly declared in the xml header. If you look at the definition files
http://www.scorm.com/scorm-explained/technical-scorm/content-packaging/xml-schema-definition-files/ some are UTF-8 and some don't descrive the encoding.
There doesn't seem to be a mention of the encoding in the guidelines either
http://www.adlnet.gov/Technologies/scorm/SCORMSDocuments/SCORM%20Resources/ADLGuidelines_V1PublicComment.zip
I guess the issue is supposed to be handled at the layer below, ie with the xml parser. The only advice I can give is to add explicit encoding informatio to the xml header, and to ensure that they are consistent - open the file in a text editor and be sure it's UTF-8.
Edit: The header should be something like: