ENH: add encoding/decoding error handling
When encoding/decoding strings with errors allow you to pass error handling strings. This works the same as error handling for other encode/decode functions. Defaults to 'strict', but you can pass 'ignore', 'replace'.

Extends work done in #1706.

thanks!
