charset detection added