NetSurf
Macros | Functions | Variables
encoding.c File Reference
#include <stdlib.h>
#include "utils/errors.h"
#include "netsurf/utf8.h"
#include "atari/encoding.h"
Include dependency graph for encoding.c:

Go to the source code of this file.

Macros

#define BEG_Atari_to_Unicode   0x7F
 

Functions

nserror utf8_to_local_encoding (const char *string, size_t len, char **result)
 
nserror utf8_from_local_encoding (const char *string, size_t len, char **result)
 
int atari_to_ucs4 (unsigned char atari)
 

Variables

static const uint16_t Atari_to_Unicode []
 
static struct gui_utf8_table utf8_table
 
struct gui_utf8_tableatari_utf8_table = &utf8_table
 

Macro Definition Documentation

◆ BEG_Atari_to_Unicode

#define BEG_Atari_to_Unicode   0x7F

Definition at line 62 of file encoding.c.

Function Documentation

◆ atari_to_ucs4()

int atari_to_ucs4 ( unsigned char  atari)

Definition at line 64 of file encoding.c.

References Atari_to_Unicode, and BEG_Atari_to_Unicode.

Referenced by nkc_to_input_key().

Here is the caller graph for this function:

◆ utf8_from_local_encoding()

nserror utf8_from_local_encoding ( const char *  string,
size_t  len,
char **  result 
)

Definition at line 43 of file encoding.c.

References result, and utf8_from_enc().

Here is the call graph for this function:

◆ utf8_to_local_encoding()

nserror utf8_to_local_encoding ( const char *  string,
size_t  len,
char **  result 
)

Definition at line 29 of file encoding.c.

References NSERROR_OK, result, and utf8_to_enc().

Here is the call graph for this function:

Variable Documentation

◆ Atari_to_Unicode

const uint16_t Atari_to_Unicode[]
static
Initial value:
= {
0x0394,
0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x00E0,0x00E5,0x00E7,0x00EA,0x00EB,0x00E8,0x00EF,0x00EE,0x00EC,0x00C4,0x00C5,
0x00C9,0x00E6,0x00C6,0x00F4,0x00F6,0x00F2,0x00FB,0x00F9,0x00FF,0x00D6,0x00DC,0x00A2,0x00A3,0x00A5,0x00DF,0x0192,
0x00E1,0x00ED,0x00F3,0x00FA,0x00F1,0x00D1,0x00AA,0x00BA,0x00BF,0x2310,0x00AC,0x00BD,0x00BC,0x00A1,0x00AB,0x00BB,
0x00C3,0x00F5,0x00D8,0x00F8,0x0153,0x0152,0x00C0,0x00C3,0x00D5,0x00A8,0x00B4,0x2020,0x00B6,0x00A9,0x00AE,0x2122,
0x0133,0x0132,0x05D0,0x05D1,0x05D2,0x05D3,0x05D4,0x05D5,0x05D6,0x05D7,0x05D8,0x05D9,0x05DB,0x05DC,0x05DE,0x05E0,
0x05E1,0x05E2,0x05E4,0x05E6,0x05E7,0x05E8,0x05E9,0x05EA,0x05DF,0x05DA,0x05DD,0x05E3,0x05E5,0x00A7,0x2038,0x221E,
0x03B1,0x03B2,0x0393,0x03C0,0x03A3,0x03C3,0x00B5,0x03C4,0x03A6,0x0398,0x03A9,0x03B4,0x222E,0x03C6,0x2208,0x2229,
0x2261,0x00B1,0x2265,0x2264,0x2320,0x2321,0x00F7,0x2248,0x00B0,0x2022,0x00B7,0x221A,0x207F,0x00B2,0x00B3,0x00AF
}

Definition at line 50 of file encoding.c.

Referenced by atari_to_ucs4().

◆ atari_utf8_table

struct gui_utf8_table* atari_utf8_table = &utf8_table

Definition at line 81 of file encoding.c.

Referenced by main().

◆ utf8_table

struct gui_utf8_table utf8_table
static
Initial value:
= {
.utf8_to_local = utf8_to_local_encoding,
.local_to_utf8 = utf8_from_local_encoding,
}
nserror utf8_to_local_encoding(const char *string, size_t len, char **result)
Definition: encoding.c:29
nserror utf8_from_local_encoding(const char *string, size_t len, char **result)
Definition: encoding.c:43

Definition at line 76 of file encoding.c.