Annotation of parser3/src/include/pa_charsets.h, revision 1.18
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.18 ! moko 14: #define IDENT_PA_CHARSETS_H "$Id: pa_charsets.h,v 1.17 2015/10/26 01:21:55 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.18 ! moko 25: Charset& get(String::Body ANAME);
! 26: Charset& get_direct(const char *ANAME);
1.9 paf 27:
1.18 ! moko 28: void load_charset(Request_charsets& charsets, String::Body ANAME, const String& afile_spec);
1.16 moko 29:
30: // detects charset if it's not enforced, skips BOM signature if it complies charset
31: static Charset* checkBOM(char *&body,size_t &body_size, Charset* enforced_charset);
1.1 paf 32: };
33:
1.9 paf 34: //@{ globals
35: extern Charset UTF8_charset;
36: extern Charsets charsets;
37: //@}
1.1 paf 38:
39: #endif
E-mail: