I'm using resx files to store localized content for some web apps. I've been asked to write a test mechanism to know if those resource files have non UTF-8 content on the values.
The resx files are XML files that on their header specify that they are UTF-8 encoded. So my question (maybe obvious or silly) is, can somebody add non UTF-8 strings into the resource file values?
I've already searched how to get the encoding for some string, but there is not bullet proof method, so I'm not sure if that test that I've been asked to create is either needed or possible...
EDIT Just for clarification, the test should be performed within the localized app, and if the string is not a valid UTF-8 then display a default (localized) value