NetSurf
|
UCS conversion tables and RISC OS-specific UTF-8 text handling. More...
#include <assert.h>
#include <limits.h>
#include <string.h>
#include <stdlib.h>
#include <oslib/osbyte.h>
#include <oslib/territory.h>
#include "utils/config.h"
#include "utils/errors.h"
#include "utils/log.h"
#include "utils/utf8.h"
#include "utils/utils.h"
#include "netsurf/utf8.h"
#include "riscos/ucstables.h"
Go to the source code of this file.
Macros | |
#define | common |
#define | common2 |
#define | SPECIAL_CHUNK_SIZE 255 |
Functions | |
const int * | ucstable_from_alphabet (int alphabet) |
Retrieve UCS table (above), given alphabet number. More... | |
nserror | utf8_to_local_encoding (const char *string, size_t len, char **result) |
Convert a UTF-8 encoded string into the system local encoding. More... | |
nserror | utf8_from_local_encoding (const char *string, size_t len, char **result) |
Convert a string encoded in the system local encoding to UTF-8. More... | |
Variables | |
static const int | latin1_table [256] |
static const int | latin2_table [256] |
static const int | latin3_table [256] |
static const int | latin4_table [256] |
static const int | latin5_table [256] |
static const int | latin6_table [256] |
static const int | latin7_table [256] |
static const int | latin8_table [256] |
static const int | latin9_table [256] |
static const int | latin10_table [256] |
static const int | welsh_table [256] |
static const int | greek_table [256] |
static const int | cyrillic_table [256] |
static const int | hebrew_table [256] |
static const char * | localencodings [] |
static const char * | special_chars [] |
static struct gui_utf8_table | utf8_table |
struct gui_utf8_table * | riscos_utf8_table = &utf8_table |
UCS conversion tables and RISC OS-specific UTF-8 text handling.
Definition in file ucstables.c.
#define common |
Definition at line 40 of file ucstables.c.
#define common2 |
Definition at line 51 of file ucstables.c.
#define SPECIAL_CHUNK_SIZE 255 |
const int * ucstable_from_alphabet | ( | int | alphabet | ) |
Retrieve UCS table (above), given alphabet number.
alphabet | The RISC OS alphabet number |
Definition at line 328 of file ucstables.c.
References cyrillic_table, greek_table, hebrew_table, latin10_table, latin1_table, latin2_table, latin3_table, latin4_table, latin5_table, latin6_table, latin7_table, latin8_table, latin9_table, and welsh_table.
Referenced by ro_gui_wimp_event_keypress().
nserror utf8_from_local_encoding | ( | const char * | string, |
size_t | len, | ||
char ** | result | ||
) |
Convert a string encoded in the system local encoding to UTF-8.
string | The string to convert |
len | The length (in bytes) of the string, or 0 |
result | Pointer to location in which to store result |
Definition at line 584 of file ucstables.c.
References localencodings, NSERROR_BAD_ENCODING, NSERROR_NOMEM, NSERROR_OK, NSLOG, result, special_chars, SPECIAL_CHUNK_SIZE, strndup(), and utf8_from_enc().
nserror utf8_to_local_encoding | ( | const char * | string, |
size_t | len, | ||
char ** | result | ||
) |
Convert a UTF-8 encoded string into the system local encoding.
string | The string to convert |
len | The length (in bytes) of the string, or 0 |
result | Pointer to location in which to store result |
Definition at line 453 of file ucstables.c.
References localencodings, NOF_ELEMENTS, NSERROR_BAD_ENCODING, NSERROR_NOMEM, NSERROR_OK, result, special_chars, strndup(), utf8_next(), and utf8_to_enc().
|
static |
Definition at line 284 of file ucstables.c.
Referenced by ucstable_from_alphabet().
|
static |
Definition at line 265 of file ucstables.c.
Referenced by ucstable_from_alphabet().
|
static |
Definition at line 303 of file ucstables.c.
Referenced by ucstable_from_alphabet().
|
static |
Definition at line 225 of file ucstables.c.
Referenced by ucstable_from_alphabet().
|
static |
Definition at line 56 of file ucstables.c.
Referenced by ucstable_from_alphabet().
|
static |
Definition at line 69 of file ucstables.c.
Referenced by ucstable_from_alphabet().
|
static |
Definition at line 88 of file ucstables.c.
Referenced by ucstable_from_alphabet().
|
static |
Definition at line 107 of file ucstables.c.
Referenced by ucstable_from_alphabet().
|
static |
Definition at line 126 of file ucstables.c.
Referenced by ucstable_from_alphabet().
|
static |
Definition at line 145 of file ucstables.c.
Referenced by ucstable_from_alphabet().
|
static |
Definition at line 164 of file ucstables.c.
Referenced by ucstable_from_alphabet().
|
static |
Definition at line 185 of file ucstables.c.
Referenced by ucstable_from_alphabet().
|
static |
Definition at line 204 of file ucstables.c.
Referenced by ucstable_from_alphabet().
|
static |
Definition at line 384 of file ucstables.c.
Referenced by utf8_from_local_encoding(), and utf8_to_local_encoding().
struct gui_utf8_table* riscos_utf8_table = &utf8_table |
Definition at line 725 of file ucstables.c.
Referenced by main().
|
static |
Definition at line 409 of file ucstables.c.
Referenced by utf8_from_local_encoding(), and utf8_to_local_encoding().
|
static |
Definition at line 720 of file ucstables.c.
|
static |
Definition at line 246 of file ucstables.c.
Referenced by ucstable_from_alphabet().