QuaZip
quazip-1-6
quazip
quazip_textcodec.h
1
#ifndef QUAZIPTEXTCODEC_H
2
#define QUAZIPTEXTCODEC_H
3
4
/*
5
Copyright (C) 2024 Gregory EUSTACHE, cen1
6
7
QuazipTextCodec is a wrapper/abstraction around QTextCodec
8
9
This file is part of QuaZip.
10
11
QuaZip is free software: you can redistribute it and/or modify
12
it under the terms of the GNU Lesser General Public License as published by
13
the Free Software Foundation, either version 2.1 of the License, or
14
(at your option) any later version.
15
16
QuaZip is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
GNU Lesser General Public License for more details.
20
21
You should have received a copy of the GNU Lesser General Public License
22
along with QuaZip. If not, see <http://www.gnu.org/licenses/>.
23
24
See COPYING file for the full LGPL text.
25
*/
26
27
#include <QByteArray>
28
#include "quazip_global.h"
29
30
#ifdef QUAZIP_CAN_USE_QTEXTCODEC
31
#include <QTextCodec>
32
typedef
QTextCodec
QuazipTextCodec
;
33
#else
34
#include <QStringConverter>
35
#endif
36
37
#ifndef QUAZIP_CAN_USE_QTEXTCODEC
38
class
QUAZIP_EXPORT
QuazipTextCodec
39
{
40
public
:
41
explicit
QuazipTextCodec
();
42
43
QByteArray fromUnicode(
const
QString &str)
const
;
44
QString toUnicode(
const
QByteArray &a)
const
;
45
46
static
QuazipTextCodec
*codecForName(
const
QByteArray &name);
47
static
QuazipTextCodec
*codecForLocale();
48
protected
:
49
static
void
setup();
50
QStringConverter::Encoding mEncoding;
51
};
52
#endif
// QUAZIP_CAN_USE_QTEXTCODEC
53
54
#endif
// QUAZIPTEXTCODEC_H
QuazipTextCodec
Definition
quazip_textcodec.h:39
Generated on Mon Apr 27 2026 14:08:14 for QuaZip by
1.9.8