23#define strcasecmp _stricmp
62 cerr <<
"Warning: UTF-BOM doesn't match encoding setting, but given encoding forced" <<
endl;
88#ifdef DISPLAY_DETECTED_UNICODE
99#ifdef DISPLAY_DETECTED_UNICODE
100 cerr <<
"UTF-16BE BOM found" <<
endl;
112 cerr <<
"UTF Error: ambiguous BOM UTF-16 or UTF-32; assume UTF-32" <<
endl;
119#ifdef DISPLAY_DETECTED_UNICODE
120 cerr <<
"UTF-16LE BOM found" <<
endl;
132#ifdef DISPLAY_DETECTED_UNICODE
133 cerr <<
"UTF-32BE BOM found" <<
endl;
161 w =
c[0] | (
c[1] << 8);
163 w =
c[1] | (
c[0] << 8);
169 for (
int i=0;
i<4;
i++)
173 d =
c[0] | (
c[1] << 8) | (
c[2] << 16) | (
c[3] << 24);
175 d =
c[3] | (
c[2] << 8) | (
c[1] << 16) | (
c[0] << 24);
186 unsigned char c, tmp;
195 if ((tmp & 0xc0) != 0xc0)
197 cerr <<
"UTF-8 Error: invalid data byte" <<
endl;
219 if ((
w & 0xfc00) == 0xd800)
223 if ((
w2 & 0xfc00) != 0xdc00)
225 cerr <<
"UTF-16 Error: invalid low surrogate" <<
endl;
228 return (((
w & 0x3ff) + 0x40) << 10) | (
w2 & 0x3ff);
241 unsigned char buffer[2] = { 0xff, 0xfe };
2681, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, 97, 105, 113, 121,
269129, 137, 145, 153, 161, 169, 177, 185, 193, 201, 209, 217, 225, 233, 241, 249,
2702, 10, 18, 26, 34, 42, 50, 58, 66, 74, 82, 90, 98, 106, 114, 122,
2713, 11, 19, 27, 35, 43, 51, 59, 4, 12, 20, 28, 5, 13, 6, 7
281 cout <<
"usage: " <<
argv[0] <<
" inputfile outputfile" <<
endl;
299 cerr <<
"Couldn't open input file." <<
endl;
302 cerr <<
"Couldn't open output file." <<
endl;
basic_ostream< _CharT, _Traits > &_STLP_CALL endl(basic_ostream< _CharT, _Traits > &__os)
void open(const char *__s, ios_base::openmode __mod=ios_base::in|ios_base::out)
streamsize gcount() const
_Self & read(char_type *__s, streamsize __n)
_Self & write(const char_type *__s, streamsize __n)
std::streamsize getWord(unsigned short &w)
static const unsigned char utf8table[64]
utf_converter(string ifname, string ofname, bom_types ofbom=bom, enc_types enc=detect)
std::streamsize getByte(unsigned char &c)
std::streamsize getDWord(wchar_t &d)
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint GLdouble GLdouble w2
GLubyte GLubyte GLubyte GLubyte w
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i