KVIrc  4.9.2
DeveloperAPIs
Classes | Macros | Functions | Variables
KviLocale.cpp File Reference
#include "kvi_debug.h"
#include "kvi_defaults.h"
#include "KviMemory.h"
#include "KviByteOrder.h"
#include "KviLocale.h"
#include "KviCString.h"
#include "KviQString.h"
#include "KviEnvironment.h"
#include "KviFileUtils.h"
#include "KviFile.h"
#include "KviPointerHashTable.h"
#include "KviTranslator.h"
#include <QtGlobal>
#include <QApplication>
#include <QTextCodec>
#include <QDir>
#include <QLocale>
#include <QByteArray>

Classes

class  KviSmartTextCodec
 

Macros

#define _KVI_LOCALE_CPP_
 
#define CONTINUATION_CHAR
 
#define UNICODE_VALID(Char)   ((Char) < 0x110000 && (((Char)&0xFFFFF800) != 0xD800) && ((Char) < 0xFDD0 || (Char) > 0xFDEF) && ((Char)&0xFFFE) != 0xFFFE)
 

Functions

static const char * fast_validate (const char *str)
 
static const char * fast_validate_len (const char *str, int max_len)
 
static bool g_utf8_validate (const char *str, int max_len, const char **end)
 

Variables

static const char * encoding_groups []
 
static KviPointerHashTable
< const char
*, KviMessageCatalogue > * 
g_pCatalogueDict = nullptr
 
KVILIB_API KviMessageCatalogueg_pMainCatalogue = nullptr
 
static KviPointerHashTable
< const char
*, KviSmartTextCodec > * 
g_pSmartCodecDict = nullptr
 
static KviTranslatorg_pTranslator = nullptr
 
static QTextCodec * g_pUtf8TextCodec = nullptr
 
static QString g_szDefaultLocalePath
 
static
KviLocale::EncodingDescription 
supported_encodings []
 

Macro Definition Documentation

#define _KVI_LOCALE_CPP_
#define CONTINUATION_CHAR
Value:
if((*(unsigned char *)p & 0xc0) != 0x80) /* 10xxxxxx */ \
goto error; \
val <<= 6; \
val |= (*(unsigned char *)p) & 0x3f;
#define p
Definition: detector.cpp:80

Referenced by fast_validate(), and fast_validate_len().

#define UNICODE_VALID (   Char)    ((Char) < 0x110000 && (((Char)&0xFFFFF800) != 0xD800) && ((Char) < 0xFDD0 || (Char) > 0xFDEF) && ((Char)&0xFFFE) != 0xFFFE)

Referenced by fast_validate(), and fast_validate_len().

Function Documentation

static const char* fast_validate ( const char *  str)
static

References CONTINUATION_CHAR, p, and UNICODE_VALID.

Referenced by g_utf8_validate().

static const char* fast_validate_len ( const char *  str,
int  max_len 
)
static

References CONTINUATION_CHAR, p, and UNICODE_VALID.

Referenced by g_utf8_validate().

static bool g_utf8_validate ( const char *  str,
int  max_len,
const char **  end 
)
static

Variable Documentation

const char* encoding_groups[]
static
Initial value:
= {
"Unicode",
"West European",
"East European",
"Cyrillic",
"Middle Eastern",
"Chinese",
"Japanese",
"Other asiatic",
nullptr
}

Referenced by KviLocale::encodingGroup().

KviPointerHashTable<const char *, KviMessageCatalogue>* g_pCatalogueDict = nullptr
static

Referenced by KviLocale::~KviLocale().

KVILIB_API KviMessageCatalogue* g_pMainCatalogue = nullptr
KviPointerHashTable<const char *, KviSmartTextCodec>* g_pSmartCodecDict = nullptr
static

Referenced by KviLocale::~KviLocale().

KviTranslator* g_pTranslator = nullptr
static

Referenced by KviLocale::~KviLocale().

QTextCodec* g_pUtf8TextCodec = nullptr
static
QString g_szDefaultLocalePath
static
KviLocale::EncodingDescription supported_encodings[]
static