added NativeString class and solved encoding issues