It looks like Discourse forums don’t load if the character encoding is set to Windows-1251 for Russian.
To reproduce, set the character encoding to “Cyrillic (Windows-1251)” and visit the homepage of a forum. It will just be a blank page. There are error messages in the console that look something like this:
Uncaught SyntaxError: Invalid regular expression:
/^[^A-Za-zГЂ-Г–Г-öø-КёМЂ-Цђа Ђ-бїїв°Ђ-п¬њп·ѕ-п№Їп»Ѕ-пїї]*[Ц‘-Яїп¬ќ-п·Ѕп№°-п»ј]/:
Range out of order in character class
at new RegExp (<anonymous>)
(I’ve only tried it with two Discourse forums – Meta Discourse and my main forum.)
A user in Russia was getting a blank page. It took several hours to track down the cause and I couldn’t reproduce it until I set my browser’s encoding to Windows-1251.
I’m wondering if other Russian language users are experiencing blank pages. It’s apparently set on his computer at the OS level (Windows), and there isn’t an easy way to change a browser’s character encoding any more without some manual configuration. The browsers’ encoding auto-detection features aren’t working well. We tried Chrome and Firefox.
We have several forums working in Russia. There is no problem if, as written above, UTF-8 is used. We did not experiment or set the encoding Windows-1251. What for? UTF-8 works for everything.
There was no blank page on any of the forums. The browser does not switch to windows-1251.
I tried in 3 browsers to force to expose Windows-1251. If the forum is in utf-8 we only gets the wrong encoding. A blank page is not observed.
I’m not sure why you aren’t seeing it there. I used this browser plugin in Chromium to test it. (Firefox seems to disable the character encoding menu on some sites.)
I just tried with a third Discourse forum, and that one doesn’t load either.
I don’t know why that user has the OS set to Windows-1251. I’m going to try to find out how often it’s happening.
I’ve just heard an update from the user though — they are using Windows XP with Chrome 49, so that is probably the source of the problem.
I did a quick search through the analytics and there have been 281 visits by 85 users on Windows XP in the past 28 days. I don’t feel like our site needs to support Windows XP, but I’d like to figure out a way to at least serve those people a “please upgrade your browser to use this site” message.
I’m going to recommend that this user upgrades the OS, at least to Linux.
I’m going to warn them about the security risks and offer to assist with Linux if they want to do that.
During the debugging I made a long list of everything to check for when those requests come in. I need to add “Windows NT 5.1” and browser versions to the list for next time.