(file) Return to XmlReader.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/XmlReader.cpp between version 1.81 and 1.82

version 1.81, 2002/11/14 16:50:33 version 1.82, 2003/03/06 22:46:04
Line 47 
Line 47 
 #include "CIMParamValue.h" #include "CIMParamValue.h"
 #include "System.h" #include "System.h"
  
 #define PEGASUS_SINT64_MIN (-PEGASUS_SINT64_LITERAL(0x8000000000000000))  #define PEGASUS_SINT64_MIN (PEGASUS_SINT64_LITERAL(0x8000000000000000))
 #define PEGASUS_UINT64_MAX PEGASUS_UINT64_LITERAL(0xFFFFFFFFFFFFFFFF) #define PEGASUS_UINT64_MAX PEGASUS_UINT64_LITERAL(0xFFFFFFFFFFFFFFFF)
  
 PEGASUS_USING_STD; PEGASUS_USING_STD;
Line 709 
Line 709 
     return n;     return n;
 } }
  
   // See http://www.ietf.org/rfc/rfc2396.txt section 2
   String XmlReader::decodeURICharacters(String uriString)
   {
       String decodedString;
       Uint32 i;
   
       for (i=0; i<uriString.size(); i++)
       {
           if (uriString[i] == '%')
           {
               if (i+2 >= uriString.size())
               {
                   throw ParseError("Invalid URI encoding");
               }
   
               Uint8 digit1 = _hexCharToNumeric(char(uriString[++i]));
               Uint8 digit2 = _hexCharToNumeric(char(uriString[++i]));
               if ( (digit1 > 15) || (digit2 > 15) )
               {
                   throw ParseError("Invalid URI encoding");
               }
   
               // ATTN: Handle non-UTF-8 character sets
               Uint16 decodedChar = Uint16(digit1<<4) + Uint16(digit2);
               decodedString.append(Char16(decodedChar));
           }
           else
           {
               decodedString.append(uriString[i]);
           }
       }
   
       return decodedString;
   }
   
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
 // //
 // stringToSignedInteger // stringToSignedInteger


Legend:
Removed from v.1.81  
changed lines
  Added in v.1.82

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2