Charset conversion fix when using 2010Q1 toolchain

credits: Stane1983