Fix for non-ASCII characters in LANGUAGES.name

Can't reproduce #1803 in a test, but fix is sane and I added the described use case to the testsuite