Non UTF-8 characters in WHMCS aborts xtext parsing in Plugin with unhelpful error message


this is not a bug in the plugin but something that should be noted in the documentation / plugin info page:

When you use WHMCS with a language that does support non standard characters like the German "Umlaute" or French, Chinese, whatever special characters, your have to take care that those characters are corectly HTML encoded.
It can happen that the WHMCS files "/includes/countries.php" contains a country name with those characters NOT being encoded. Also the states dropdown ("assets/js/StatesDropDown.js"), a hard coded comment in a template file or even the language file used can contain not encoded characters. So this issue can be easily triggered if the customer decides to use a custom language.

As it will work well with english language, it will be a hard catch to track down the main issue :wink:

Having thos characters on a WHMCS page that should be integrated will only display a red warning stating that "The page you requested does not look like a WHMCS page". But in fact the parser aborts because of "wrong encoding".

Took me a fair amount of time to debug this. That's why I would like to share that information and would suggest at least to drop a note at the Plugin page. Maybe even catch the "wrong encoding" error in the code and throw an appropriate error message.

Hope that helps :slight_smile: