--- parser3/src/include/pa_charset.h 2002/06/27 11:56:18 1.15.2.1 +++ parser3/src/include/pa_charset.h 2003/03/21 09:43:48 1.21 @@ -1,15 +1,15 @@ /** @file Parser: Charset connection decl. - Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) - - $Id: pa_charset.h,v 1.15.2.1 2002/06/27 11:56:18 paf Exp $ */ #ifndef PA_CHARSET_H #define PA_CHARSET_H +static const char* IDENT_CHARSET_H="$Date: 2003/03/21 09:43:48 $"; + #include "pa_pool.h" #include "pa_exception.h" #include "pa_common.h" @@ -56,6 +56,21 @@ public: const Charset& dest_transcoder, const void *& dest_body, size_t& dest_content_length ); + static String& transcode(Pool& pool, + const Charset& source_transcoder, + const Charset& dest_transcoder, + const String& src); + + static void transcode(Pool& pool, + const Charset& source_transcoder, + const Charset& dest_transcoder, + Array& src); + + static void transcode(Pool& pool, + const Charset& source_transcoder, + const Charset& dest_transcoder, + Hash& src); + #ifdef XML xmlCharEncodingHandler *transcoder(const String *source); #endif @@ -105,11 +120,19 @@ public: /// converts GdomeDOMString string to char * const char *transcode_cstr(GdomeDOMString *s); /// converts GdomeDOMString string to parser String - String& transcode(GdomeDOMString *s); + String& transcode(GdomeDOMString *s +#ifndef NO_STRING_ORIGIN + , const String *origin +#endif + ); /// converts xmlChar* null-terminated string to char * const char *transcode_cstr(xmlChar *s); /// converts xmlChar* null-terminated string to parser String - String& transcode(xmlChar *s); + String& transcode(xmlChar *s +#ifndef NO_STRING_ORIGIN + , const String *origin +#endif + ); /** converts sized char * to xmlChar* @returns xmlChar * which caller should free */