Merge changes from topic 'utf'

* changes:
  Add bound checks to utf16_to_utf8
  Unicode: specify destination length in utf8_to_utf16 methods