58 return (oc >> 6) == 0x2;
69 (cp != 0xfffe) && (cp != 0xffff);
76 }
else if ((lead >> 5) == 0x06) {
78 }
else if ((lead >> 4) == 0x0e) {
80 }
else if ((lead >> 3) == 0x1e) {
96 template <
typename octet_iterator>
127 cp = ((cp << 6) & 0x7ff) + ((*it) & 0x3f);
135 cp = ((cp << 12) & 0xffff) + ((*it << 6) & 0xfff);
149 cp = ((cp << 18) & 0x1fffff) + ((*it << 12) & 0x3ffff);
151 cp += (*it << 6) & 0xfff;
170 for (
int i = 0; i < length - 1; ++i) {
184 }
else if (cp < 0x800) {
189 }
else if (cp < 0x10000) {
200 template <
typename octet_iterator>
210 const uint8_t
bom[] = { 0xef, 0xbb, 0xbf };
212 template <
typename octet_iterator>
216 while (result != end) {
225 template <
typename octet_iterator>
226 inline bool is_valid(octet_iterator start, octet_iterator end)
231 template <
typename octet_iterator>
234 return ((*it++ ==
bom[0]) &&
239 template<
typename octet_iterator>
246 template<
typename octet_iterator>