Fix a wrongly passed parameter in text_box.cpp
move UTF-8 functions to a separate namespace