You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by na...@apache.org on 2009/02/13 21:36:40 UTC

svn commit: r744234 - /webservices/axis/trunk/c/src/platforms/os400/PlatformSpecificOS400.cpp

Author: nadiramra
Date: Fri Feb 13 20:36:39 2009
New Revision: 744234

URL: http://svn.apache.org/viewvc?rev=744234&view=rev
Log:
AXISCPP-964 SOAP request/response not UTF-8 encoded (but claims to be)
AXISCPP-856 Add Platform Services Abstraction Layer

Modified:
    webservices/axis/trunk/c/src/platforms/os400/PlatformSpecificOS400.cpp

Modified: webservices/axis/trunk/c/src/platforms/os400/PlatformSpecificOS400.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/platforms/os400/PlatformSpecificOS400.cpp?rev=744234&r1=744233&r2=744234&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/platforms/os400/PlatformSpecificOS400.cpp (original)
+++ webservices/axis/trunk/c/src/platforms/os400/PlatformSpecificOS400.cpp Fri Feb 13 20:36:39 2009
@@ -28,8 +28,6 @@
 #include <qp0lstdi.h>                   // Qp0lCvtPathToQSYSObjName()
 #include <unistd.h>                     // readlink()
 #include <except.h>
-#include <iconv.h>                      // iconv_t, iconv()
-#include <qtqiconv.h>                   // QtqCode_T, QtqIconvOpen()
 #include <errno.h>
 #include <qwcrtvca.h>                   // Retrieve job's ccsid API prototype 
 
@@ -347,55 +345,6 @@
 }
 
 
-#define CCSID_JOB 0
-#define CCSID_UTF8 1208
-
-static iconv_t generateConverter
-(
- int fromCcsid,
- int toCcsid
- )
-{
-    iconv_t converterObject;
-    
-    QtqCode_T toCode, fromCode;
-    
-    memset(&toCode, 0x00, sizeof(QtqCode_T));
-    memset(&fromCode, 0x00, sizeof(QtqCode_T));
-
-    fromCode.CCSID = fromCcsid;
-    fromCode.shift_alternative = 1;
-    toCode.CCSID = toCcsid;
-    converterObject = QtqIconvOpen(&toCode, &fromCode);
-
-    return converterObject;
-}
-
-static iconv_t cvtrJobToUtf8 = generateConverter(CCSID_JOB, CCSID_UTF8);
-
-char *toUTF8(char *fromBuf, int fromBufLen)
-{
-   if (fromBufLen == 0 || fromBuf == NULL)
-      return strdup("");
-
-   size_t outBytesLeft = 4*fromBufLen;
-   char *toBuf = (char *)malloc(outBytesLeft);
-
-   int myToBufLen = outBytesLeft;
-   char *myToBuf = toBuf;
-
-   size_t irc = iconv(cvtrJobToUtf8,&fromBuf, (size_t *)&fromBufLen,&myToBuf, &outBytesLeft);
-   myToBufLen -= outBytesLeft;
-        
-   if (irc == (size_t)-1)
-   {
-         free(toBuf);
-         toBuf = NULL;
-   }
-
-   return toBuf;
-}
-
 char PLATFORM_DOUBLE_QUOTE_S[]               = "\"";
 char PLATFORM_DOUBLE_QUOTE_C                 = '\"';
 char PLATFORM_XML_ENTITY_REFERENCE_CHARS_S[] = "<>&\"\'";