Annotation of parser3/src/include/pa_charsets.h, revision 1.25

1.1       paf         1: /** @file
                      2:        Parser: sql driver manager decl.
                      3: 
1.24      moko        4:        Copyright (c) 2001-2026 Art. Lebedev Studio (https://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.25    ! moko       14: #define IDENT_PA_CHARSETS_H "$Id: pa_charsets.h,v 1.24 2026/04/25 13:38:46 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.25    ! moko       27:        Charset& get_file_charset(String::Body ANAME);
1.9       paf        28: 
1.18      moko       29:        void load_charset(Request_charsets& charsets, String::Body ANAME, const String& afile_spec);
1.16      moko       30: 
                     31:        // detects charset if it's not enforced, skips BOM signature if it complies charset
                     32:        static Charset* checkBOM(char *&body,size_t &body_size, Charset* enforced_charset);
1.25    ! moko       33: 
        !            34:        static String::C encodeUTF16(const String::C src, bool bom);
1.1       paf        35: };
                     36: 
1.9       paf        37: //@{ globals
1.19      moko       38: extern Charset pa_UTF8_charset;
1.25    ! moko       39: extern Charset pa_UTF16_charset;
1.19      moko       40: extern Charsets pa_charsets;
1.9       paf        41: //@}
1.1       paf        42: 
                     43: #endif

E-mail: