Added a flag to resolve UTF-8 sequence errors