X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..f4dda581a49f46d468a8d8aefc31f37aca3ef7d1:/include/wx/cocoa/string.h diff --git a/include/wx/cocoa/string.h b/include/wx/cocoa/string.h index be1067101d..75e782dbe2 100644 --- a/include/wx/cocoa/string.h +++ b/include/wx/cocoa/string.h @@ -25,7 +25,7 @@ inline NSString* wxNSStringWithWxString(const wxString &wxstring) { #if wxUSE_UNICODE - return [NSString stringWithUTF8String: wxstring.mb_str(wxConvUTF8)]; + return [NSString stringWithUTF8String: wxstring.utf8_str()]; #else return [NSString stringWithCString: wxstring.c_str() length:wxstring.Len()]; #endif // wxUSE_UNICODE @@ -35,7 +35,7 @@ inline NSString* wxNSStringWithWxString(const wxString &wxstring) inline NSString* wxInitNSStringWithWxString(NSString *nsstring, const wxString &wxstring) { #if wxUSE_UNICODE - return [nsstring initWithUTF8String: wxstring.mb_str(wxConvUTF8)]; + return [nsstring initWithUTF8String: wxstring.utf8_str()]; #else return [nsstring initWithCString: wxstring.c_str() length:wxstring.Len()]; #endif // wxUSE_UNICODE @@ -44,7 +44,7 @@ inline NSString* wxInitNSStringWithWxString(NSString *nsstring, const wxString & inline wxString wxStringWithNSString(NSString *nsstring) { #if wxUSE_UNICODE - return wxString([nsstring UTF8String], wxConvUTF8); + return wxString::FromUTF8([nsstring UTF8String]); #else return wxString([nsstring lossyCString]); #endif // wxUSE_UNICODE