29#ifndef CODECVTE_H_INCLUDED
37#define RWSTD_TABLE_SIZE 59
44class ex_codecvt:
public std::codecvt<char, char, std::mbstate_t>
54 const char* &from_next,
57 char* &to_next)
const {
59 const std::size_t from_size = std::size_t (from_end - from);
60 const std::size_t to_size = std::size_t (to_limit - to);
62 std::size_t
i = from_size < to_size ? from_size : to_size;
67 for (std::size_t
j = 0;
j <
i; ++
j, ++from_next, ++to_next) {
69 *to_next = *from_next;
72 if ( *from_next >= table_[
k][0]
73 && *from_next <= table_[
k][1]) {
74 *to_next = table_[
k][2];
87 const char* &from_next,
90 char* &to_next)
const {
92 const std::size_t from_size = std::size_t (from_end - from);
93 const std::size_t to_size = std::size_t (to_limit - to);
95 std::size_t
i = from_size < to_size ? from_size : to_size;
100 for (std::size_t
j = 0;
j <
i; ++
j, ++from_next, ++to_next) {
102 *to_next = *from_next;
105 if ( *from_next == table_[
k][2]
106 && table_[
k][0] == table_[
k][1]) {
107 *to_next = table_[
k][1];
127 {
'\xa2',
'\xa2',
'\x9b' }, {
'\xa3',
'\xa3',
'\x9c' },
128 {
'\xa5',
'\xa5',
'\x9d' }, {
'\xa7',
'\xa7',
'\x15' },
129 {
'\xa8',
'\xa8',
'\x22' }, {
'\xaa',
'\xaa',
'\xa6' },
130 {
'\xab',
'\xab',
'\xae' }, {
'\xb5',
'\xb5',
'\xe6' },
131 {
'\xb6',
'\xb6',
'\x14' }, {
'\xb7',
'\xb7',
'\xfa' },
132 {
'\xba',
'\xba',
'\xa7' }, {
'\xbb',
'\xbb',
'\xaf' },
133 {
'\xbc',
'\xbc',
'\xac' }, {
'\xbd',
'\xbd',
'\xab' },
134 {
'\xbf',
'\xbf',
'\xa8' }, {
'\xc0',
'\xc3',
'\x41' },
135 {
'\xc4',
'\xc4',
'\x8e' }, {
'\xc5',
'\xc5',
'\x41' },
136 {
'\xc6',
'\xc6',
'\x92' }, {
'\xc7',
'\xc7',
'\x80' },
137 {
'\xc8',
'\xc8',
'\x45' }, {
'\xc9',
'\xc9',
'\x90' },
138 {
'\xca',
'\xcb',
'\x45' }, {
'\xcc',
'\xcf',
'\x49' },
139 {
'\xd1',
'\xd1',
'\xa5' }, {
'\xd2',
'\xd5',
'\x4f' },
140 {
'\xd6',
'\xd6',
'\x99' }, {
'\xd8',
'\xd8',
'\xed' },
141 {
'\xd9',
'\xdb',
'\x55' }, {
'\xdc',
'\xdc',
'\x9a' },
142 {
'\xdd',
'\xdd',
'\x59' }, {
'\xdf',
'\xdf',
'\xe1' },
143 {
'\xe0',
'\xe0',
'\x85' }, {
'\xe1',
'\xe1',
'\xa0' },
144 {
'\xe2',
'\xe2',
'\x83' }, {
'\xe3',
'\xe3',
'\x61' },
145 {
'\xe4',
'\xe4',
'\x84' }, {
'\xe5',
'\xe5',
'\x86' },
146 {
'\xe6',
'\xe6',
'\x91' }, {
'\xe7',
'\xe7',
'\x87' },
147 {
'\xe8',
'\xe8',
'\x8a' }, {
'\xe9',
'\xe9',
'\x82' },
148 {
'\xea',
'\xea',
'\x88' }, {
'\xeb',
'\xeb',
'\x89' },
149 {
'\xec',
'\xec',
'\x8d' }, {
'\xed',
'\xed',
'\xa1' },
150 {
'\xee',
'\xee',
'\x8c' }, {
'\xef',
'\xef',
'\x8b' },
151 {
'\xf1',
'\xf1',
'\xa4' }, {
'\xf2',
'\xf2',
'\x95' },
152 {
'\xf3',
'\xf3',
'\xa2' }, {
'\xf4',
'\xf4',
'\x93' },
153 {
'\xf5',
'\xf5',
'\x6f' }, {
'\xf6',
'\xf6',
'\x94' },
154 {
'\xf9',
'\xf9',
'\x97' }, {
'\xfa',
'\xfa',
'\xa3' },
155 {
'\xfb',
'\xfb',
'\x96' }, {
'\xfc',
'\xfc',
'\x81' },
156 {
'\xff',
'\xff',
'\x98' }
virtual result do_in(std::mbstate_t &, const char *from, const char *from_end, const char *&from_next, char *to, char *to_limit, char *&to_next) const
virtual bool do_always_noconv() const _THROWS(())
virtual int do_encoding() const _THROWS(())
virtual result do_out(std::mbstate_t &, const char *from, const char *from_end, const char *&from_next, char *to, char *to_limit, char *&to_next) const