Annotation of parser3/src/include/pa_charsets.h, revision 1.17
1.1 paf 1: /** @file
2: Parser: sql driver manager decl.
3:
1.17 ! moko 4: Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com)
1.5 paf 5: Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
1.1 paf 6:
7:
8: global sql driver manager, must be thread-safe
9: */
10:
11: #ifndef PA_CHARSETS_H
12: #define PA_CHARSETS_H
1.6 paf 13:
1.17 ! moko 14: #define IDENT_PA_CHARSETS_H "$Id: pa_charsets.h,v 1.16 2015/10/13 21:27:57 moko Exp $"
1.1 paf 15:
16: #include "pa_hash.h"
1.9 paf 17: #include "pa_charset.h"
1.1 paf 18:
1.9 paf 19: /// convention: use UPPERCASE keys
1.14 misha 20: class Charsets: public HashString<Charset*> {
1.1 paf 21: public:
1.2 paf 22:
1.9 paf 23: Charsets();
24:
1.10 paf 25: Charset& get(const String::Body ANAME);
1.9 paf 26:
1.10 paf 27: void load_charset(Request_charsets& charsets, const String::Body ANAME, const String& afile_spec);
1.16 moko 28:
29: // detects charset if it's not enforced, skips BOM signature if it complies charset
30: static Charset* checkBOM(char *&body,size_t &body_size, Charset* enforced_charset);
1.1 paf 31: };
32:
1.9 paf 33: //@{ globals
34: extern Charset UTF8_charset;
35: extern Charsets charsets;
36: //@}
1.1 paf 37:
38: #endif
E-mail: