You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ra...@locus.apache.org on 2000/05/12 01:13:32 UTC
cvs commit: xml-xerces/c/src/util/Transcoders/ICU ICUTransService.cpp
rahulj 00/05/11 16:13:32
Modified: c/src/util/Transcoders/ICU ICUTransService.cpp
Log:
Works with latest revision of ICU which provides a hard
linked data DLL. i.e. icudata.dll will be loaded when xerces-c is
loaded.
Revision Changes Path
1.19 +21 -0 xml-xerces/c/src/util/Transcoders/ICU/ICUTransService.cpp
Index: ICUTransService.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/Transcoders/ICU/ICUTransService.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ICUTransService.cpp 2000/04/12 18:41:28 1.18
+++ ICUTransService.cpp 2000/05/11 23:13:31 1.19
@@ -56,6 +56,11 @@
/*
* $Log: ICUTransService.cpp,v $
+ * Revision 1.19 2000/05/11 23:13:31 rahulj
+ * Works with latest revision of ICU which provides a hard
+ * linked data DLL. i.e. icudata.dll will be loaded when xerces-c is
+ * loaded.
+ *
* Revision 1.18 2000/04/12 18:41:28 roddey
* Fixed a small 'one off' problem in the calls to ICU.
*
@@ -139,6 +144,13 @@
#include <unicode/ucnv.h>
#include <unicode/ucnv_err.h>
#include <unicode/ustring.h>
+#include <unicode/udata.h>
+
+
+#if !defined(XML_OS390) && !defined(XML_AS400) && !defined(XML_HPUX)
+// Forward reference the symbol which points to the ICU converter data.
+extern "C" const uint8_t U_IMPORT icudata_dat[];
+#endif
@@ -199,6 +211,17 @@
// ---------------------------------------------------------------------------
ICUTransService::ICUTransService()
{
+#if !defined(XML_OS390) && !defined(XML_AS400) && !defined(XML_HPUX)
+ // Pass the location of the converter data to ICU. By doing so, we are
+ // forcing the load of ICU converter data DLL, after the Xerces-C DLL is
+ // loaded. This implies that Xerces-C, now has to explicitly link with the
+ // ICU converter dll. However, the advantage is that we no longer depend
+ // on the code which does demand dynamic loading of DLL's. The demand
+ // loading is highly system dependent and was a constant source of support
+ // calls.
+ UErrorCode uerr = U_ZERO_ERROR;
+ udata_setCommonData((void *) icudata_dat, &uerr);
+#endif
}
ICUTransService::~ICUTransService()