• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • sources
  • kde-4.14
  • kdelibs
  • kdecore
  • localization
kcharsets.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 #ifndef KCHARSETS_H
20 #define KCHARSETS_H
21 
22 #include <kdemacros.h>
23 #include <kdecore_export.h>
24 #include <QtCore/QList>
25 
26 class KCharsets;
27 class KCharsetsPrivate;
28 
29 class QChar;
30 class QString;
31 class QStringList;
32 class QTextCodec;
33 
34 namespace KGlobal
35 {
36  KDECORE_EXPORT KCharsets *charsets();
37 }
38 
46 class KDECORE_EXPORT KCharsets
47 {
48  friend KCharsets *KGlobal::charsets();
49 
50 protected:
54  KCharsets();
55 
56 public:
57 
61  virtual ~KCharsets();
62 
69  QTextCodec *codecForName(const QString &name) const;
70 
83  QTextCodec *codecForName(const QString &n, bool &ok) const;
84 
93  static QChar fromEntity(const QString &str);
94 
104  static QChar fromEntity(const QString &str, int &len);
105 
112  static QString toEntity(const QChar &ch);
113 
120  static QString resolveEntities( const QString &text );
121 
126  QStringList availableEncodingNames() const;
127 
132  QStringList descriptiveEncodingNames() const;
133 
138  QList<QStringList> encodingsByScript() const;
139 
147 #ifndef KDE_NO_DEPRECATED
148  KDE_DEPRECATED QString languageForEncoding( const QString &encoding ) const;
149 #endif
150 
156  QString descriptionForEncoding( const QString& encoding ) const;
157 
163  QString encodingForName( const QString &descriptiveName ) const;
164 
165 private:
166  KCharsetsPrivate* const d;
167 
178  QTextCodec *codecForNameOrNull( const QByteArray& n ) const;
179 };
180 
181 #endif
KCharsets
Charset font and encoder/decoder handling.
Definition: kcharsets.h:46
kdecore_export.h
QByteArray
QChar
KGlobal::charsets
KCharsets * charsets()
The global charset manager.
Definition: kglobal.cpp:214
QString
QList< QStringList >
QTextCodec
QStringList
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal