LeechCraft  0.6.70-18450-gabe19ee3b0
Modular cross-platform feature rich live environment.
encodingconverter.h
Go to the documentation of this file.
1 /**********************************************************************
2  * LeechCraft - modular cross-platform feature rich internet client.
3  * Copyright (C) 2006-2014 Georg Rudoy
4  *
5  * Distributed under the Boost Software License, Version 1.0.
6  * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7  **********************************************************************/
8 
9 #pragma once
10 
11 #include <QStringDecoder>
12 #include <QStringEncoder>
13 #include "sysconfig.h"
14 
15 namespace LC::Util
16 {
18  {
19  QString Name_;
20  QStringEncoder Encoder_;
21  QStringDecoder Decoder_;
22  public:
23  class UnknownEncoding : std::runtime_error
24  {
25  QString Encoding_;
26  public:
27  explicit UnknownEncoding (const QString& encoding);
28 
29  QString GetEncoding () const;
30  };
31 
33  explicit EncodingConverter (QAnyStringView encoding);
34 
35  QString GetName () const;
36 
37  QString ToUnicode (QByteArrayView bytes);
38  QByteArray FromUnicode (QStringView string);
39  };
40 }
std::string Name_
#define UTIL_SYS_API
Definition: sysconfig.h:16