XMLParserCPP 1.0
Loading...
Searching...
No Matches
XMLTextEncoding.h
1/*
2 * Copyright (C) 2025 Yury Bobylev <bobilev_yury@mail.ru>
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the Free
6 * Software Foundation, version 3.
7 *
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program. If not, see <https://www.gnu.org/licenses/>.
15 */
16#ifndef XMLTEXTENCODING_H
17#define XMLTEXTENCODING_H
18
19#include <string>
20#include <vector>
21
30{
31public:
42 static std::string
43 detectDocumentEncoding(const std::string &document);
44
54 static std::vector<std::string>
55 detectStringEncoding(const std::string &str,
56 const bool &filter = bool(false));
57
67 static void
68 convertToEncoding(const std::string &source, std::string &result,
69 const std::string &source_code_page,
70 const std::string &result_code_page);
71};
72
73#endif // XMLTEXTENCODING_H
The XMLTextEncoding class.
Definition XMLTextEncoding.h:30
static std::vector< std::string > detectStringEncoding(const std::string &str, const bool &filter=bool(false))
Detects text string encoding.
static void convertToEncoding(const std::string &source, std::string &result, const std::string &source_code_page, const std::string &result_code_page)
Converts string from one encoding to another.
static std::string detectDocumentEncoding(const std::string &document)
Detects XML document encoding.