wxString str = "Hello, world!"; const char* utf8Str = str.ToUTF8();
wxString str1 = "こんにちは"; wxString str2 = "안녕하세요"; const char* utf8Str1 = str1.ToUTF8(); const char* utf8Str2 = str2.ToUTF8();This example creates two wxString objects containing Japanese and Korean greetings, respectively, then calls the ToUTF8 function on each to convert them to UTF-8 encoded C-style strings. The `wxString` class belongs to the package wxWidgets, which is a C++ library for creating cross-platform GUI applications.