Fix build with FrameworkCompilerSettings
The code used a lot of cast from/to ASCII, which is no longer allowed with these settings.