You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2002/09/06 06:12:26 UTC

cvs commit: xml-xalan/c/src/PlatformSupport XalanTranscodingServices.cpp XalanTranscodingServices.hpp

dbertoni    2002/09/05 21:12:26

  Modified:    c/src/PlatformSupport XalanTranscodingServices.cpp
                        XalanTranscodingServices.hpp
  Log:
  New UTF encoding.
  
  Revision  Changes    Path
  1.15      +29 -1     xml-xalan/c/src/PlatformSupport/XalanTranscodingServices.cpp
  
  Index: XalanTranscodingServices.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/XalanTranscodingServices.cpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- XalanTranscodingServices.cpp	18 Apr 2002 04:50:50 -0000	1.14
  +++ XalanTranscodingServices.cpp	6 Sep 2002 04:12:26 -0000	1.15
  @@ -98,6 +98,19 @@
   
   
   
  +const XalanDOMChar 	XalanTranscodingServices::s_utf32String[] =
  +{
  +	XalanUnicode::charLetter_U,
  +	XalanUnicode::charLetter_T,
  +	XalanUnicode::charLetter_F, 
  +	XalanUnicode::charHyphenMinus,
  +	XalanUnicode::charDigit_3,
  +	XalanUnicode::charDigit_2,
  +	0
  +};
  +
  +
  +
   const XalanDOMChar 	XalanTranscodingServices::s_asciiString[] =
   {
   	XalanUnicode::charLetter_A,
  @@ -251,7 +264,7 @@
   
   
   bool
  -XalanTranscodingServices::encodingIsUTF8(const XalanDOMString&		theEncodingName)
  +XalanTranscodingServices::encodingIsUTF8(const XalanDOMString&	theEncodingName)
   {
   	return encodingIsUTF8(c_wstr(theEncodingName));
   }
  @@ -269,6 +282,21 @@
   XalanTranscodingServices::encodingIsUTF16(const XalanDOMString&		theEncodingName)
   {
   	return encodingIsUTF16(c_wstr(theEncodingName));
  +}
  +
  +
  +
  +bool
  +XalanTranscodingServices::encodingIsUTF32(const XalanDOMChar*	theEncodingName)
  +{
  +	return compareIgnoreCaseASCII(c_wstr(theEncodingName), s_utf32String) == 0 ? true : false;
  +}
  +
  +
  +bool
  +XalanTranscodingServices::encodingIsUTF32(const XalanDOMString&		theEncodingName)
  +{
  +	return encodingIsUTF32(c_wstr(theEncodingName));
   }
   
   
  
  
  
  1.11      +23 -4     xml-xalan/c/src/PlatformSupport/XalanTranscodingServices.hpp
  
  Index: XalanTranscodingServices.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/XalanTranscodingServices.hpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- XalanTranscodingServices.hpp	5 Sep 2002 00:51:28 -0000	1.10
  +++ XalanTranscodingServices.hpp	6 Sep 2002 04:12:26 -0000	1.11
  @@ -157,7 +157,7 @@
   	/**
   	 * Determine if the encoding name supplied is equivalent to UTF-8.
   	 * 
  -	 * @param theEncodingName The name of the desired output encoding.
  +	 * @param theEncodingName The name of the output encoding.
   	 * @return true or false
   	 */
   	static bool
  @@ -166,7 +166,7 @@
   	/**
   	 * Determine if the encoding name supplied is equivalent to UTF-8.
   	 * 
  -	 * @param theEncodingName The name of the desired output encoding.
  +	 * @param theEncodingName The name of the output encoding.
   	 * @return true or false
   	 */
   	static bool
  @@ -175,7 +175,7 @@
   	/**
   	 * Determine if the encoding name supplied is equivalent to UTF-16.
   	 * 
  -	 * @param theEncodingName The name of the desired output encoding.
  +	 * @param theEncodingName The name of the output encoding.
   	 * @return true or false
   	 */
   	static bool
  @@ -184,13 +184,30 @@
   	/**
   	 * Determine if the encoding name supplied is equivalent to UTF-16.
   	 * 
  -	 * @param theEncodingName The name of the desired output encoding.
  +	 * @param theEncodingName The name of the output encoding.
   	 * @return true or false
   	 */
   	static bool
   	encodingIsUTF16(const XalanDOMString&	theEncodingName);
   
   	/**
  +	 * Determine if the encoding name supplied is equivalent to UTF-32.
  +	 * 
  +	 * @param theEncodingName The name of the output encoding.
  +	 * @return true or false
  +	 */
  +	static bool
  +	encodingIsUTF32(const XalanDOMChar*		theEncodingName);
  +
  +	/**
  +	 * Determine if the encoding name supplied is equivalent to UTF-32.
  +	 * 
  +	 * @param theEncodingName The name of the output encoding.
  +	 * @return true or false
  +	 */
  +	static bool
  +	encodingIsUTF32(const XalanDOMString&	theEncodingName);
  +	/**
   	 * Get an array that contains any leading bytes that should be
   	 * written to an XML stream for the specified encoding.  For example,
   	 * if the encoding is UTF-16, the vector will contain the appropriate
  @@ -244,6 +261,8 @@
   	static const XalanDOMChar 	s_utf8String[];
   
   	static const XalanDOMChar 	s_utf16String[];
  +
  +	static const XalanDOMChar 	s_utf32String[];
   
   	static const XalanDOMChar 	s_asciiString[];
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org