[sword-cvs] sword/src/modules/filters utf8arshaping.cpp,1.5,1.6 utf8bidireorder.cpp,1.5,1.6 utf8nfc.cpp,1.7,1.8 utf8nfkd.cpp,1.7,1.8 utf8transliterator.cpp,1.26,1.27
sword@www.crosswire.org
sword@www.crosswire.org
Thu, 27 Feb 2003 00:39:40 -0700
Update of /usr/local/cvsroot/sword/src/modules/filters
In directory www:/tmp/cvs-serv29516/src/modules/filters
Modified Files:
utf8arshaping.cpp utf8bidireorder.cpp utf8nfc.cpp utf8nfkd.cpp
utf8transliterator.cpp
Log Message:
no message
Index: utf8arshaping.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/utf8arshaping.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** utf8arshaping.cpp 22 Feb 2003 12:23:19 -0000 1.5
--- utf8arshaping.cpp 27 Feb 2003 07:39:37 -0000 1.6
***************
*** 41,45 ****
len = u_shapeArabic(ustr, len, ustr2, len, U_SHAPE_LETTERS_SHAPE | U_SHAPE_DIGITS_EN2AN, &err);
! ucnv_fromUChars(conv, text.c_str(), maxlen, ustr2, len, &err);
delete [] ustr2;
--- 41,47 ----
len = u_shapeArabic(ustr, len, ustr2, len, U_SHAPE_LETTERS_SHAPE | U_SHAPE_DIGITS_EN2AN, &err);
! text.setSize(text.size()*2);
! len = ucnv_fromUChars(conv, text.getRawData(), text.size(), ustr2, len, &err);
! text.setSize(len);
delete [] ustr2;
Index: utf8bidireorder.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/utf8bidireorder.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** utf8bidireorder.cpp 22 Feb 2003 12:23:19 -0000 1.5
--- utf8bidireorder.cpp 27 Feb 2003 07:39:37 -0000 1.6
***************
*** 50,54 ****
// UBIDI_DO_MIRRORING | UBIDI_REMOVE_BIDI_CONTROLS, &err);
! ucnv_fromUChars(conv, text.c_str(), maxlen, ustr2, len, &err);
delete [] ustr2;
--- 50,56 ----
// UBIDI_DO_MIRRORING | UBIDI_REMOVE_BIDI_CONTROLS, &err);
! text.setSize(text.size()*2);
! len = ucnv_fromUChars(conv, text.getRawData(), text.size(), ustr2, len, &err);
! text.setSize(len);
delete [] ustr2;
Index: utf8nfc.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/utf8nfc.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** utf8nfc.cpp 22 Feb 2003 21:36:43 -0000 1.7
--- utf8nfc.cpp 27 Feb 2003 07:39:37 -0000 1.8
***************
*** 41,45 ****
unorm_normalize(source, len, UNORM_NFC, 0, target, len, &err);
! ucnv_fromUChars(conv, text.c_str(), maxlen, target, -1, &err);
delete [] source;
--- 41,47 ----
unorm_normalize(source, len, UNORM_NFC, 0, target, len, &err);
! text.setSize(text.size()*2);
! len = ucnv_fromUChars(conv, text.getRawData(), text.size(), target, -1, &err);
! text.setSize(len);
delete [] source;
Index: utf8nfkd.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/utf8nfkd.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** utf8nfkd.cpp 22 Feb 2003 21:36:43 -0000 1.7
--- utf8nfkd.cpp 27 Feb 2003 07:39:37 -0000 1.8
***************
*** 41,48 ****
unorm_normalize(source, len, UNORM_NFKD, 0, target, len, &err);
! ucnv_fromUChars(conv, text.c_str(), maxlen, target, -1, &err);
! delete [] source;
! delete [] target;
return 0;
--- 41,50 ----
unorm_normalize(source, len, UNORM_NFKD, 0, target, len, &err);
! text.setSize(text.size()*2);
! len = ucnv_fromUChars(conv, text.getRawData(), text.size(), target, -1, &err);
! text.setSize(len);
! delete [] source;
! delete [] target;
return 0;
Index: utf8transliterator.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/utf8transliterator.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** utf8transliterator.cpp 26 Feb 2003 20:05:59 -0000 1.26
--- utf8transliterator.cpp 27 Feb 2003 07:39:37 -0000 1.27
***************
*** 713,721 ****
if (trans && !U_FAILURE(err)) {
UnicodeString target = UnicodeString(source);
! trans->transliterate(target);
! len = ucnv_fromUChars(conv, text, maxlen, target.getBuffer(), target.length(), &err);
! if (len < maxlen) *(text + len) = 0;
! else *(text + maxlen) = 0;
! delete trans;
}
ucnv_close(conv);
--- 713,721 ----
if (trans && !U_FAILURE(err)) {
UnicodeString target = UnicodeString(source);
! trans->transliterate(target);
! text.setSize(text.size()*2);
! len = ucnv_fromUChars(conv, text.getRawData(), text.size(), target.getBuffer(), target.length(), &err);
! text.setSize(len);
! delete trans;
}
ucnv_close(conv);