Fix bb8a0c7641: Skip control codes when sorting strings. (#13035)
commit9cf47e69d6c377bdef61ccc8bc76d9e4ebd50f36
authorPeter Nelson <peter1138@openttd.org>
Sun, 27 Oct 2024 15:49:09 +0000 (27 15:49 +0000)
committerGitHub <noreply@github.com>
Sun, 27 Oct 2024 15:49:09 +0000 (27 15:49 +0000)
tree6724d8edc540ab80326e40f8386d965b5b74edac
parent233ee16c44cf930beb5d89598e29467244740396
Fix bb8a0c7641: Skip control codes when sorting strings. (#13035)

Now that SkipGarbage doesn't skip all multi-byte utf-8 characters, string control codes are not skipped either. This gave unintended sorting when NewGRF names start with colour codes.

Make SkipGarbage UTF-8 aware so that it is able to skip some unicode ranges as well.
src/string.cpp