Ensure that strings returned by wxMBConv_cf are in NFC form.

Normalize all Unicode strings used internally even though the Darwin kernel
gives them to us in decomposed (NFD) form.

Closes #11730.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-11-05 21:40:09 +00:00
parent dc36b43adf
commit 8244507f68
2 changed files with 11 additions and 2 deletions

View File

@@ -3443,8 +3443,9 @@ WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvCurrent = wxGet_wxConvLibcPtr();
WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvUI = wxGet_wxConvLocalPtr();
#ifdef __DARWIN__
// The xnu kernel always communicates file paths in decomposed UTF-8.
// WARNING: Are we sure that CFString's conversion will cause decomposition?
// It is important to use this conversion object under Darwin as it ensures
// that Unicode strings are (re)composed correctly even though xnu kernel uses
// decomposed form internally (at least for the file names).
static wxMBConv_cf wxConvMacUTF8DObj(wxFONTENCODING_UTF8);
#endif