11 #ifndef __TEXTWOLF_CHARSET_ISOLATIN_HPP__
12 #define __TEXTWOLF_CHARSET_ISOLATIN_HPP__
34 template <
class Iterator>
35 static inline void skip(
char*,
unsigned int& bufpos, Iterator& itr)
45 template <
class Iterator>
46 static inline void fetchbytes(
char* buf,
unsigned int& bufpos, Iterator& itr)
57 template <
class Iterator>
58 static inline signed char asciichar(
char* buf,
unsigned int& bufpos, Iterator& itr)
61 return ((
unsigned char)(buf[0])>127)?-1:buf[0];
65 template <
class Iterator>
66 inline UChar value(
char* buf,
unsigned int& bufpos, Iterator& itr)
const
73 template <
class Buffer_>
82 while (*cc) buf.push_back( *cc++);
UChar value(char *buf, unsigned int &bufpos, Iterator &itr) const
See template<class Iterator>Interface::value(char*,unsigned int&,Iterator&)
Definition: charset_isolatin.hpp:66
UChar ucharcode(char ch) const
Get the unicode character representation of the character ch in this codepage.
Definition: codepages.hpp:119
static bool is_equal(const IsoLatinCodePage &a, const IsoLatinCodePage &b)
Evaluate if two code pages are equal.
Definition: codepages.hpp:144
IsoLatin(unsigned int codePageIdx=1)
Definition: charset_isolatin.hpp:30
static bool encode(UChar chr, char *bufptr, std::size_t bufsize)
Write the character 'chr' in encoded form as nul-terminated string to a buffer.
Definition: charset_interface.hpp:29
static void fetchbytes(char *buf, unsigned int &bufpos, Iterator &itr)
See template<class Iterator>Interface::fetchbytes(char*,unsigned int&,Iterator&)
Definition: charset_isolatin.hpp:46
char invcode(UChar ch) const
Get the character representation of a unicode character in this codepage.
Definition: codepages.hpp:128
uint32_t UChar
Unicode character type.
Definition: char.hpp:37
Character set IsoLatin-1,..IsoLatin-9 (ISO-8859-1,...ISO-8859-9)
Definition: charset_isolatin.hpp:24
Definition of unicode characters.
IsoLatin(const IsoLatin &o)
Definition: charset_isolatin.hpp:28
static signed char asciichar(char *buf, unsigned int &bufpos, Iterator &itr)
See template<class Iterator>Interface::asciichar(char*,unsigned int&,Iterator&)
Definition: charset_isolatin.hpp:58
Interface that describes what a character set encoding implementation has to define to be used as cha...
Definition of exceptions with containing error codes thrown by textwolf.
IsoLatin code page.
Definition: codepages.hpp:22
static bool is_equal(const IsoLatin &a, const IsoLatin &b)
See template<class Buffer>Interface::is_equal( const Interface&, const Interface&) ...
Definition: charset_isolatin.hpp:91
void print(UChar chr, Buffer_ &buf) const
See template<class Buffer>Interface::print(UChar,Buffer&)
Definition: charset_isolatin.hpp:74
Definition: charset_isolatin.hpp:26
static void skip(char *, unsigned int &bufpos, Iterator &itr)
See template<class Iterator>Interface::skip(char*,unsigned int&,Iterator&)
Definition: charset_isolatin.hpp:35
Definition of IsoLatin code pages.