--- parser3/src/include/pa_common.h 2008/06/06 17:24:04 1.121 +++ parser3/src/include/pa_common.h 2008/07/15 12:50:24 1.124 @@ -8,7 +8,7 @@ #ifndef PA_COMMON_H #define PA_COMMON_H -static const char * const IDENT_COMMON_H="$Date: 2008/06/06 17:24:04 $"; +static const char * const IDENT_COMMON_H="$Date: 2008/07/15 12:50:24 $"; #include "pa_string.h" #include "pa_hash.h" @@ -105,7 +105,8 @@ bool file_read_action_under_lock(const S char *file_read_text(Request_charsets& charsets, const String& file_spec, bool fail_on_read_problem=true, - HashStringValue* options=0/*, HashStringValue* * out_fields=0*/); + HashStringValue* options=0, + bool transcode_result=true); struct File_read_result { bool success; @@ -126,7 +127,7 @@ File_read_result file_read(Request_chars bool as_text, HashStringValue* options=0, bool fail_on_read_problem=true, - char* buf=0, size_t offset=0, size_t size=0); + char* buf=0, size_t offset=0, size_t size=0, bool transcode_text_result=true); typedef void (*File_write_action)(int f, void *context); @@ -197,7 +198,7 @@ const char* format(double value, char *f size_t stdout_write(const void *buf, size_t size); -char* unescape_chars(const char* cp, int len, Charset* client_charset=0); +char* unescape_chars(const char* cp, int len, Charset* client_charset=0, bool ignore_plus=false); #ifdef WIN32 void back_slashes_to_slashes(char *s); @@ -210,14 +211,10 @@ void back_slashes_to_slashes(char *s); #endif bool StrStartFromNC(const char* str, const char* substr, bool equal=false); -char* pa_tolower(char* str); -char* pa_toupper(char* str); size_t strpos(const char *str, const char *substr); -char* strpart(const char* str, size_t len); -Charset* detect_charset(char* content_type_value); -Charset* detect_charset(const char* content_type_value); -Charset* detect_charset(Request_charsets& charsets, const String& content_type_value); +Charset* detect_charset(const char* content_type); +Charset* detect_charset(Charset& source_charset, const String& content_type); #define SECS_PER_DAY (60*60*24) int getMonthDays(int year, int month);