cargilld    2005/03/04 18:45:29

  Modified:    c/src/xercesc/util/Transcoders/ICU ICUTransService.cpp
  Log:
  Initialize ICU to avoid multithreading problems.  Fix from Markus.
  
  Revision  Changes    Path
  1.19      +9 -2      
xml-xerces/c/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp
  
  Index: ICUTransService.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/c/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ICUTransService.cpp       29 Dec 2004 22:00:56 -0000      1.18
  +++ ICUTransService.cpp       5 Mar 2005 02:45:28 -0000       1.19
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 1999-2004 The Apache Software Foundation.
  + * Copyright 1999-2005 The Apache Software Foundation.
    * 
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
  @@ -22,6 +22,7 @@
   // 
---------------------------------------------------------------------------
   //  Includes
   // 
---------------------------------------------------------------------------
  +#include <xercesc/util/PlatformUtils.hpp>
   #include <xercesc/util/Janitor.hpp>
   #include <xercesc/util/TranscodingException.hpp>
   #include <xercesc/util/XMLString.hpp>
  @@ -123,6 +124,12 @@
   // 
---------------------------------------------------------------------------
   ICUTransService::ICUTransService()
   {
  +    UErrorCode errorCode=U_ZERO_ERROR;
  +    u_init(&errorCode);
  +    if(U_FAILURE(errorCode)) {
  +        XMLPlatformUtils::panic(PanicHandler::Panic_NoTransService);
  +    }    
  +
   #if !defined(XML_OS390) && !defined(XML_AS400) && !defined(XML_HPUX) && 
!defined(XML_PTX)
   #if (U_ICU_VERSION_MAJOR_NUM < 2)
       // Starting with ICU 2.0, ICU itself includes a static reference to the 
data
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to