Hi,
I get this error when I try to take data from the database. There was no problem before I have introduced Turkish characters into the database. The database is oracle with java on the server-side. I take data in XML format.
public IEnumerator GetQuestions ()
{
string url = Utility.serverURL + "?m=getQuestions";
WWW request = new WWW(url);
yield return request;
MemoryStream memoryStream = new MemoryStream(request.bytes);
XmlSerializer serializer = new XmlSerializer(typeof(Questions));
Questions questionList = serializer.Deserialize(memoryStream) as Questions;
}
[XmlRoot("Questions")]
public class Questions
{
[XmlElement("Question")]
public List<Question> Items = new List<Question>();
}
I have solved my previous problem but now I have a new one.
I have introduced this line at the top of the .jsp file, after that unity threw no errors but still didn’t show the Turkish characters.
Then I changed the code in the post above to this.
MemoryStream memoryStream = new MemoryStream(request.bytes);
TextReader textReader = new StreamReader(memoryStream, Encoding.GetEncoding("iso-8859-9"));
XmlSerializer serializer = new XmlSerializer(typeof(Questions));
Questions questionList = serializer.Deserialize(textReader) as Questions;
Now while running the game in the editor, everything is fine, but as a standalone application the game can’t encode Turkish characters.
Error from the output_log.txt.
When I encode it as UTF-8 in Unity, Turkish characters don’t appear. I tried making the xml header encoding ISO-8859-9 but I got no data and no error. I’ve done more searching and come up a post which says this could be .dll problem, unity editor has access to some l18n.dlls but unity generated executables do not.
I have imported I18N.MidEast.dll to my project and it worked fine for standalone build, but I couldn’t manage to build for Unity webplayer, I think importing native dlls is forbidden in webplayer because of security reasons. Any ideas?