diff --git a/stepmania/src/RageUtil.cpp b/stepmania/src/RageUtil.cpp index 6685716785..3cde44c513 100644 --- a/stepmania/src/RageUtil.cpp +++ b/stepmania/src/RageUtil.cpp @@ -1042,3 +1042,12 @@ void ReplaceText( CString &Text, const map &m ) } } } + +/* Form a string to identify a wchar_t with ASCII. */ +CString WcharDisplayText(wchar_t c) +{ + CString chr; + chr = ssprintf("U+%4.4x", c); + if(c < 128) chr += ssprintf(" ('%c')", char(c)); + return chr; +} diff --git a/stepmania/src/RageUtil.h b/stepmania/src/RageUtil.h index b4efe44a6a..9096bed541 100644 --- a/stepmania/src/RageUtil.h +++ b/stepmania/src/RageUtil.h @@ -210,6 +210,7 @@ void regex_flags(int flags); void Replace_Unicode_Markers( CString &Text ); void ReplaceText( CString &Text, const map &m ); +CString WcharDisplayText(wchar_t c); #ifndef WIN32 #include /* correct place with correct definitions */