[sword-svn] r2861 - trunk/src/modules/filters
chrislit at crosswire.org
chrislit at crosswire.org
Mon Jul 8 02:01:53 MST 2013
Author: chrislit
Date: 2013-07-08 02:01:53 -0700 (Mon, 08 Jul 2013)
New Revision: 2861
Modified:
trunk/src/modules/filters/utf8arabicpoints.cpp
Log:
corrected logic in UTF8ArabicPoints (in case we need to roll back the next commit)
Modified: trunk/src/modules/filters/utf8arabicpoints.cpp
===================================================================
--- trunk/src/modules/filters/utf8arabicpoints.cpp 2013-07-08 08:57:38 UTC (rev 2860)
+++ trunk/src/modules/filters/utf8arabicpoints.cpp 2013-07-08 09:01:53 UTC (rev 2861)
@@ -48,14 +48,16 @@
SWBuf orig = text;
const unsigned char* from = (unsigned char*)orig.c_str();
for (text = ""; *from; from++) {
- if (((*from == 0xFC) && (*(from + 1) >= 0xE5 && *(from + 1) <= 0x63)) || ((*from == 0xFE) && (*(from + 1) >= 0x70 && *(from + 1) <= 0x7F)) || ((*from == 0x06) && (*(from + 1) >= 0x4B && *(from + 1) <= 0x55))){
+ if ((*from == 0xD9) && (*(from + 1) >= 0x8B && *(from + 1) <= 0x95)) {
from++;
}
- else {
- text += *from;
- }
+ else if ((*from == 0xEF) &&
+ (((*(from + 1) == 0xB1) && (*(from + 2) >= 0x9E && *(from + 2) <= 0xA3)) ||
+ ((*(from + 1) == 0xB9) && (*(from + 2) >= 0x4B && *(from + 2) <= 0x55)))) {
+ from += 2;
+ }
}
- }
+ }
return 0;
}
More information about the sword-cvs
mailing list