fix warning

don't mangle first character if non-ASCII
This commit is contained in:
Glenn Maynard
2004-01-03 04:30:34 +00:00
parent f5d1503387
commit d680cc1f2f
+3 -1
View File
@@ -965,7 +965,9 @@ CString Capitalize( const CString &s )
if( s.GetLength()==0 )
return "";
CString s2 = s;
s2[0] = toupper( s2[0] );
/* XXX: utf-8 */
if( s2[0] <= 127 )
s2[0] = (char) toupper( s2[0] );
return s2;
}