0

My application doesn't load levels properly on computers with different cultures.

If I change the Thread culture to InvariantCulture I can reproduce the issue on my computer

I think it is failing at reading XML information, some assets seem to get loaded in that by coincidence don't break the culture.

I'm using a StreamReader, XmlDocument and XmlNode, I've tried formatting to InvariantCulture but to no avail.

I don't get any error messages, it seems to load and start the game properly but many tiles are missing.

Has anyone come across the same issue and figured out a solution?

This seems to be a very similar issue, although I'm not getting any exceptions since I'm not using fonts;

foreign culture XML text parsing

Community
  • 1
  • 1
Orujimaru
  • 835
  • 2
  • 13
  • 18
  • Do your map names (or content) contain culture specific characters? – Nahuel Ianni Jul 25 '14 at 06:09
  • No, but I have read Swedish culture sorts 'v' and 'w' differently from other cultures and I think I see a connection that assets and properties that have no 'v' or 'w' load properly while those that do, don't'. And to be clear my native culture is Swedish – Orujimaru Jul 25 '14 at 06:16
  • I'm thinking I need to define the culture of the thread reading the XML. – Orujimaru Jul 25 '14 at 08:06

1 Answers1

0

By defining the culture of the thread myself, in this case forcing it to be Swedish on all computers the issue was solved.

Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("sv-SE");
Orujimaru
  • 835
  • 2
  • 13
  • 18