Ensure the character lookup works for imported charsets.
removed unused code