Annotation of parser3/src/include/pa_charsets.h, revision 1.23
1.1 paf 1: /** @file
2: Parser: sql driver manager decl.
3:
1.23 ! moko 4: Copyright (c) 2001-2024 Art. Lebedev Studio (http://www.artlebedev.com)
1.22 moko 5: Authors: Konstantin Morshnev <moko@design.ru>, Alexandr Petrosian <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.23 ! moko 14: #define IDENT_PA_CHARSETS_H "$Id: pa_charsets.h,v 1.22 2023/09/26 20:49:06 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
1.19 moko 35: extern Charset pa_UTF8_charset;
36: extern Charsets pa_charsets;
1.9 paf 37: //@}
1.1 paf 38:
39: #endif
E-mail: