Fix for error Incorrectly encoded string