Fix the char encoding specific generators for all the string literal

This pull request provides a more consistent handling of the character encodings for the literal primitives.