Fix #12529 / Improve to_clipboard for objects containing unicode
Superceded by #14599

---

- [x] closes #12529
- [ ] tests added / passed
- [ ] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry

I added the whatsnew entry to 0.18.0.
