japanese.c File Reference
`#include "transcode_data.h"`

Go to the source code of this file.

## Macros

#define | eucjp2sjis_8E_offsets 0
#define | eucjp2sjis_8F_A1toFE_offsets 96
#define | eucjp2sjis_offsets 192
#define | sjis2eucjp_81to9F_offsets 449
#define | sjis2eucjp_offsets 640
#define | eucjp2sjis_8E_infos WORDINDEX2INFO(0)
#define | eucjp2sjis_8E WORDINDEX2INFO(3)
#define | eucjp2sjis_8F_A1toFE_infos WORDINDEX2INFO(5)
#define | eucjp2sjis_8F_A1toFE WORDINDEX2INFO(7)
#define | eucjp2sjis_8F_infos WORDINDEX2INFO(9)
#define | eucjp2sjis_8F WORDINDEX2INFO(11)
#define | eucjp2sjis_A1toFE_infos WORDINDEX2INFO(13)
#define | eucjp2sjis_A1toFE WORDINDEX2INFO(15)
#define | eucjp2sjis_infos WORDINDEX2INFO(17)
#define | eucjp2sjis WORDINDEX2INFO(22)
#define | sjis2eucjp_81to9F WORDINDEX2INFO(24)
#define | sjis2eucjp_F0toFC WORDINDEX2INFO(26)
#define | sjis2eucjp_infos WORDINDEX2INFO(28)
#define | sjis2eucjp WORDINDEX2INFO(33)
#define | TRANSCODE_TABLE_INFO japanese_byte_array, 895, japanese_word_array, 35, ((int)sizeof(unsigned int))

## Functions

static ssize_t | fun_so_eucjp2sjis (void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
static ssize_t | fun_so_sjis2eucjp (void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
void | Init_japanese (void)

## Variables

static const unsigned char | japanese_byte_array [895]
static const unsigned int | japanese_word_array [35]
static const rb_transcoder | rb_eucjp2sjis
static const rb_transcoder | rb_sjis2eucjp

## Macro Definition Documentation

#define eucjp2sjis WORDINDEX2INFO(22)

#define eucjp2sjis_8E WORDINDEX2INFO(3)

#define eucjp2sjis_8E_infos WORDINDEX2INFO(0)

#define eucjp2sjis_8E_offsets 0

#define eucjp2sjis_8F WORDINDEX2INFO(11)

#define eucjp2sjis_8F_A1toFE WORDINDEX2INFO(7)

#define eucjp2sjis_8F_A1toFE_infos WORDINDEX2INFO(5)

#define eucjp2sjis_8F_A1toFE_offsets 96

#define eucjp2sjis_8F_infos WORDINDEX2INFO(9)

#define eucjp2sjis_A1toFE WORDINDEX2INFO(15)

#define eucjp2sjis_A1toFE_infos WORDINDEX2INFO(13)

#define eucjp2sjis_infos WORDINDEX2INFO(17)

#define eucjp2sjis_offsets 192

#define sjis2eucjp WORDINDEX2INFO(33)

#define sjis2eucjp_81to9F WORDINDEX2INFO(24)

#define sjis2eucjp_81to9F_offsets 449

#define sjis2eucjp_F0toFC WORDINDEX2INFO(26)

#define sjis2eucjp_infos WORDINDEX2INFO(28)

#define sjis2eucjp_offsets 640

#define TRANSCODE_TABLE_INFO japanese_byte_array, 895, japanese_word_array, 35, ((int)sizeof(unsigned int))

Definition at line 140 of file japanese.c.

## Function Documentation

static ssize_t fun_so_eucjp2sjis | ( | void * | statep,
|  | const unsigned char * | s,
|  | size_t | l,
|  | unsigned char * | o,
|  | size_t | osize
| ) |  |

static

Definition at line 144 of file japanese.c.

static ssize_t fun_so_sjis2eucjp | ( | void * | statep,
|  | const unsigned char * | s,
|  | size_t | l,
|  | unsigned char * | o,
|  | size_t | osize
| ) |  |

static

Definition at line 165 of file japanese.c.

void Init_japanese | ( | void |  | ) |

Definition at line 215 of file japanese.c.

References rb_eucjp2sjis, rb_register_transcoder(), and rb_sjis2eucjp.

## Variable Documentation

const unsigned char japanese_byte_array[895]

static

Definition at line 10 of file japanese.c.

const unsigned int japanese_word_array[35]

static

Definition at line 84 of file japanese.c.

const rb_transcoder rb_eucjp2sjis

static

Initial value:
= {
"EUC-JP", "Shift_JIS", eucjp2sjis,
TRANSCODE_TABLE_INFO,
1,
3,
2,
asciicompat_converter,
0, NULL, NULL,
NULL, NULL, NULL, fun_so_eucjp2sjis
}

Definition at line 191 of file japanese.c.

Referenced by Init_japanese().

const rb_transcoder rb_sjis2eucjp

static

Initial value:
= {
"Shift_JIS", "EUC-JP", sjis2eucjp,
TRANSCODE_TABLE_INFO,
1,
2,
2,
asciicompat_converter,
0, NULL, NULL,
NULL, NULL, NULL, fun_so_sjis2eucjp
}

Definition at line 203 of file japanese.c.

Referenced by Init_japanese().