Fix #6693: Calculate correct length when pasting strings with multi-byte unicode characters
Merge pull request #6694 from mbauman/unicode-paste

Fix #6693: Calculate correct length when pasting strings with multi-byte unicode characters