外国文化XML文本解析

外国文化XML文本解析

本文介绍了外国文化XML文本解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经发布了一个Windows Phone应用程序。从那时起,BugSense报告了一个在国外造成一些崩溃的问题:

I have released a windows phone app a while back. Since then, BugSense reported a problem that is causing some crashes in foreign countries:

这里是堆栈跟踪:

我的应用程序是一个单词游戏,我检索来自XML文件的每个级别的单词。所以我怀疑XmlReader正在读取该文件,它使用外部文化,导致检索拉丁字母,然后应用程序在使用严格英文的sprite字体绘制字母时崩溃。
我尝试寻找一种方法来指示XmlReader使用InvariantCulture读取,类似于.toString()方法中找到的,但没有找到任何。任何想法如何解决这个问题?

My app is a word game, and I retrieve the words for each level from an XML file. So I suspect that as the XmlReader is reading the file, it does so using a foreign culture which results in with a Latin letter being retrieved, then the app crashes when it tries to draw the letter using a strictly English sprite-font.I tried looking for a way to instruct the XmlReader to read using InvariantCulture, similar to that found in the .toString() method, but haven't found any. Any ideas how to solve this issue?

推荐答案

看起来更多的输入XML文件问题给我。检查它是否包含此无效字符('İ'(0x0130)),并在必要时进行更正。如果您使用应用程序/游戏编写输入XML,请检查是否使用InvariantCulture编写内容。

Seems more an input XML file problem to me. Check if it contains this 'invalid' character ('İ' (0x0130) ) and correct it if necessary. If you wrote the input XML using your app/game, check if you are writing the contents using InvariantCulture as well.

Br,

这篇关于外国文化XML文本解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 05:54