move utf8_substr to ui::helper class.
add utf8 support for UITextField
change unsigned long to size_type
refactor
Merge pull request #7608 from andyque/fixTextFieldUtf8Issue

add utf8 support for TextField widget