extract charset from text as a web service