hdi_core is designed to use UTF-8 encoding basically everywhere, which is why you see proper strings when acquiring them via hdi_core. I strongly suggest you work in UTF-8 whenever possible, falling back to UTF-16 or UTF-32 only when necessary. Platform encoding should be avoided (there are some edge cases where that is not possible, but this is not one of them).
Anyway, if you already have an ai::UnicodeString object, you need only call its as_UTF8() method to acquire a std::string in UTF-8 encoding.
If you have a UTF-8 encoded std::string and want to ensure proper construction of a new ai::UnicodeString object with it, pass it to the UnicodeString constructor followed by the kAIUTF8CharacterEncoding constant to indicate the encoding.
Anyway, if you already have an ai::UnicodeString object, you need only call its as_UTF8() method to acquire a std::string in UTF-8 encoding.
If you have a UTF-8 encoded std::string and want to ensure proper construction of a new ai::UnicodeString object with it, pass it to the UnicodeString constructor followed by the kAIUTF8CharacterEncoding constant to indicate the encoding.