add WcharDisplayText

This commit is contained in:
Glenn Maynard
2003-01-09 23:53:14 +00:00
parent ab079c4afb
commit 1d961c3c31
2 changed files with 10 additions and 0 deletions
+9
View File
@@ -1042,3 +1042,12 @@ void ReplaceText( CString &Text, const map<CString,CString> &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;
}
+1
View File
@@ -210,6 +210,7 @@ void regex_flags(int flags);
void Replace_Unicode_Markers( CString &Text );
void ReplaceText( CString &Text, const map<CString,CString> &m );
CString WcharDisplayText(wchar_t c);
#ifndef WIN32
#include <unistd.h> /* correct place with correct definitions */