Closed Simplxss closed 1 year ago
Thanks for finding the bug.
Normally a library have a helper class with this type of static functions. In C++/CLI code the MdfLibrary class (mdflibrary.h/cpp) is typically used for those purposes. So I recommend to add a static function like:
static String^ Utf8Conversion(const std::string& utf8_string);
to the MdfLibrary class.
Optionally a unit test (see mdflibrary_test) can be added. Sometimes an empty string generates unexpected results.
I add you as a contributer to the repository.
Thanks for your instructions, I will change it later.
Fix String coding error when return String to C#
I think it's better to create a function to do the coding convinsion, but I don't find approprite place to put it.