Having problems with “invalid string” errors?

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
Posts: 206
Joined: December 17th, 2015, 10:27 pm

Having problems with “invalid string” errors?

Post by Can-ned_Food » December 10th, 2017, 12:09 pm

I will provide an example message for this error:
error config: Error: invalid string: �Flat Overlay
The initial character there is Unicode point FFFD. In UTF-8, 0xEFBFBD (0xef 0xbf 0xbd).

I first noticed the trouble with text failing to appear in the Wesnoth GUI.
I thought that it was caused by some overrun somewhere while processing the WML in my various add–ons: when it occurs at all, multiple strings which have no problems alone are afflicted and seemingly corrupted during caching. I tested the possibility that it was caused by non–UTF-8 text by disabling any add–ons which contained any such text data, but occurance of the error was not alleviated.

If anyone has any information regarding this trouble, please provide that here. I will update this post with the results of my perpetrated investigations.

Posts: 327
Joined: April 24th, 2016, 4:18 pm

Re: Having problems with “invalid string” errors?

Post by Tad_Carlucci » December 10th, 2017, 3:14 pm

Start here:


My first guess would be that this is the very beginning of the file and originally the code-point was a Byte Order Mark and somewhere along the line, instead of discarding it as it should, something converted it to the Replacement Character.
I forked real life and now I'm getting merge conflicts.

Post Reply