Conversion between character sets and surfaces