Implements #13 - Add charset detection