Use unicode internally everywhere for 'repr'.

Closes #2270.