Qore Programming Language 0.8.8

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Classes | Typedefs | Variables
QoreEncoding.h File Reference

### (6086)

`#include <qore/common.h>`
`#include <qore/QoreThreadLock.h>`
`#include <strings.h>`
`#include <string.h>`
`#include <map>`
`#include <string>`
Include dependency graph for QoreEncoding.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
class | QoreEncoding
| defines string encoding functions in Qore More...
class | QoreEncodingManager
| manages encodings in Qore More...

## Typedefs
typedef qore_size_t(* | mbcs_charlen_t )(const char *str, qore_size_t valid_len)
| for multi-byte encodings: gives the number of total bytes for the character given one or more characters More...
typedef qore_size_t(* | mbcs_end_t )(const char *str, const char *end, qore_size_t num_chars, bool &invalid)
| for multi-byte character set encodings: gives the number of bytes for the number of chars
typedef qore_size_t(* | mbcs_length_t )(const char *str, const char *end, bool &invalid)
| for multi-byte character set encodings: gives the length of the string in characters
typedef qore_size_t(* | mbcs_pos_t )(const char *str, const char *ptr, bool &invalid)
| for multi-byte character set encodings: gives the character position of the ptr

## Variables
DLLEXPORT const QoreEncoding * | QCS_DEFAULT
| the default encoding for the Qore library
DLLEXPORT const QoreEncoding * | QCS_ISO_8859_1
| latin-1, Western European encoding
DLLEXPORT const QoreEncoding * | QCS_ISO_8859_10
| latin-6, Nordic character set
DLLEXPORT const QoreEncoding * | QCS_ISO_8859_11
| Thai character set.
DLLEXPORT const QoreEncoding * | QCS_ISO_8859_13
| latin-7, Baltic rim character set
DLLEXPORT const QoreEncoding * | QCS_ISO_8859_14
| latin-8, Celtic character set
DLLEXPORT const QoreEncoding * | QCS_ISO_8859_15
| latin-9, Western European with euro symbol
DLLEXPORT const QoreEncoding * | QCS_ISO_8859_16
| latin-10, Southeast European character set
DLLEXPORT const QoreEncoding * | QCS_ISO_8859_2
| latin-2, Central European encoding
DLLEXPORT const QoreEncoding * | QCS_ISO_8859_3
| latin-3, Southern European character set
DLLEXPORT const QoreEncoding * | QCS_ISO_8859_4
| latin-4, Northern European character set
DLLEXPORT const QoreEncoding * | QCS_ISO_8859_5
| Cyrillic character set.
DLLEXPORT const QoreEncoding * | QCS_ISO_8859_6
| Arabic character set.
DLLEXPORT const QoreEncoding * | QCS_ISO_8859_7
| Greek character set.
DLLEXPORT const QoreEncoding * | QCS_ISO_8859_8
| Hebrew character set.
DLLEXPORT const QoreEncoding * | QCS_ISO_8859_9
| latin-5, Turkish character set
DLLEXPORT const QoreEncoding * | QCS_KOI7
| Russian: Kod Obmena Informatsiey, 7 bit characters.
DLLEXPORT const QoreEncoding * | QCS_KOI8_R
| Russian: Kod Obmena Informatsiey, 8 bit.
DLLEXPORT const QoreEncoding * | QCS_KOI8_U
| Ukrainian: Kod Obmena Informatsiey, 8 bit.
DLLEXPORT const QoreEncoding * | QCS_USASCII
| ascii encoding
DLLEXPORT const QoreEncoding * | QCS_UTF8
| UTF-8 multi-byte encoding (the only multi-byte encoding, all others are single-byte encodings)
DLLEXPORT QoreEncodingManager | QEM
| the QoreEncodingManager object

## Detailed Description

provides definitions related to character encoding support in Qore including the QoreEncoding class and QCS_DEFAULT, the default encoding for the Qore library

## Typedef Documentation

typedef qore_size_t(* mbcs_charlen_t)(const char *str, qore_size_t valid_len)

for multi-byte encodings: gives the number of total bytes for the character given one or more characters

Parameters

  str | a pointer to the character data to check
  len | the number of valid bytes at the start of the character pointer

Returns
  0=invalid, positive = number of characters needed, negative numbers = number of additional bytes needed to perform the check