Added detection in canvas for UnicodeEncodeError and fallback to `?`