--- parser3/src/include/pa_charset.h 2010/08/27 02:53:34 1.45 +++ parser3/src/include/pa_charset.h 2012/03/16 09:24:08 1.48 @@ -1,14 +1,14 @@ /** @file Parser: Charset connection decl. - Copyright (c) 2001-2009 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ #ifndef PA_CHARSET_H #define PA_CHARSET_H -static const char * const IDENT_CHARSET_H="$Date: 2010/08/27 02:53:34 $"; +#define IDENT_PA_CHARSET_H "$Id: pa_charset.h,v 1.48 2012/03/16 09:24:08 moko Exp $" #include "pa_exception.h" @@ -140,24 +140,24 @@ private: bool fisUTF8; Tables tables; -#ifdef XML - -private: - void addEncoding(char* name_cstr); - void initTranscoder(const String::Body name, const char* name_cstr); - static size_t calc_escaped_length_UTF8(XMLByte* src, size_t src_length); - static size_t calc_escaped_length(XMLByte* src, size_t src_length, const Charset::Tables& tables); + static size_t calc_escaped_length(const XMLByte* src, size_t src_length, const Charset::Tables& tables); static size_t calc_escaped_length(const String::C src, const Charset& source_charset); static size_t escape_UTF8(const XMLByte* src, size_t src_length, XMLByte* dest); static size_t escape(const XMLByte* src, size_t src_length, XMLByte* dest, const Charset::Tables& tables); static size_t calc_JSON_escaped_length_UTF8(XMLByte* src, size_t src_length); - static size_t calc_JSON_escaped_length(XMLByte* src, size_t src_length, const Charset::Tables& tables); + static size_t calc_JSON_escaped_length(const XMLByte* src, size_t src_length, const Charset::Tables& tables); static size_t calc_JSON_escaped_length(const String::C src, const Charset& source_charset); static size_t escape_JSON_UTF8(const XMLByte* src, size_t src_length, XMLByte* dest); static size_t escape_JSON(const XMLByte* src, size_t src_length, XMLByte* dest, const Charset::Tables& tables); +#ifdef XML + +private: + void addEncoding(char* name_cstr); + void initTranscoder(const String::Body name, const char* name_cstr); + public: /// converts xmlChar* null-terminated string to char* String::C transcode_cstr(const xmlChar* s);