[sword-cvs] sword/src/keys versekey.cpp,1.61,1.62
sword@www.crosswire.org
sword@www.crosswire.org
Sat, 17 Apr 2004 10:16:19 -0700
Update of /cvs/core/sword/src/keys
In directory www:/tmp/cvs-serv8616/src/keys
Modified Files:
versekey.cpp
Log Message:
Added StringMgr to allow frontend side unicode handling; breaks no code; IcuStringMgr needs a fix in upperUtf8; added support for loading Utf8 locales (joachim)
Index: versekey.cpp
===================================================================
RCS file: /cvs/core/sword/src/keys/versekey.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- versekey.cpp 6 Feb 2004 21:01:01 -0000 1.61
+++ versekey.cpp 17 Apr 2004 17:16:16 -0000 1.62
@@ -15,6 +15,7 @@
#endif
#include <utilstr.h>
+#include <stringmgr.h>
#include <swkey.h>
#include <swlog.h>
#include <versekey.h>
@@ -323,8 +324,13 @@
for (int i = 0; i < 2; i++) {
stdstr(&abbr, iabbr);
strstrip(abbr);
- if (!i)
+ if (!i && StringMgr::hasUtf8Support()) { //we have support for UTF-8 handling; we expect UTF-8 encoded locales
+ toupperstr_utf8(abbr);
+ }
+ else if (!i) {
toupperstr(abbr);
+ }
+
abLen = strlen(abbr);
if (abLen) {