Thread portable class


Gate portable class


Timer class


Pool class


Terimber 2.0


About C++


Downloads Products & Services Support Clients Open Source About



Home / Open source / Terimber 2.0

defxml.hpp File Reference

#include "xml/defxml.h"

Go to the source code of this file.

Functions

BEGIN_TERIMBER_NAMESPACE
xml_forceinline bool 
usascii_to_utf8 (ub4_t in, ub1_t *out, size_t &count)
 converts ascii char to utf-8 char sequence
xml_forceinline bool fixedN_to_utf8 (encodingSchema schema, const ub1_t *in, size_t count, ub1_t *out, size_t &converted, size_t &processed, size_t &more)
 converts fixed width char buffer into utf-8 biffer
xml_forceinline bool utf8_to_utf8 (const ub1_t *in, size_t count, size_t &processed, size_t &more)
 checks if the input buffer is valid utf-8 string
xml_forceinline void windowsN_to_utf8 (encodingSchema schema, const ub1_t *in, size_t count, ub1_t *out, size_t &converted, size_t &processed)
 converts the Windows encoding to utf-8
xml_forceinline void isoN_to_utf8 (encodingSchema schema, const ub1_t *in, size_t count, ub1_t *out, size_t &converted, size_t &processed)
 converts the ISO encoding to utf-8


Function Documentation

xml_forceinline bool fixedN_to_utf8 ( encodingSchema  schema,
const ub1_t in,
size_t  count,
ub1_t out,
size_t &  converted,
size_t &  processed,
size_t &  more 
)

converts fixed width char buffer into utf-8 biffer

Parameters:
schema  encoding schema
in  input buffer
count  input buffer length
out  output buffer
converted  input chars converted
processed  output chars processed
more  more input chars required to process output utf-8 char, crop input chars

Definition at line 98 of file defxml.hpp.

References ch_cr, ch_hor_tab, ch_lf, s_leadingByte, UCS_4B, UCS_4BS, UCS_4L, UCS_4LS, UTF_16B, and UTF_16L.

Referenced by byte_source::convert_chars(), and byte_source::taste_buffer().

xml_forceinline void isoN_to_utf8 ( encodingSchema  schema,
const ub1_t in,
size_t  count,
ub1_t out,
size_t &  converted,
size_t &  processed 
)

converts the ISO encoding to utf-8

Parameters:
schema  encoding schema
in  input ISO encoding buffer
count  input buffer length
out  output buffer
converted  input chars converted
processed  output chars processed

Definition at line 375 of file defxml.hpp.

References s_leadingByte, and UTF_ISO88591.

Referenced by byte_source::convert_chars().

BEGIN_TERIMBER_NAMESPACE xml_forceinline bool usascii_to_utf8 ( ub4_t  in,
ub1_t out,
size_t &  count 
)

converts ascii char to utf-8 char sequence

Parameters:
in  input ascii char
out  output utf-8 buffer
count  count of processed utf-8 chars

Definition at line 38 of file defxml.hpp.

References ch_cr, ch_hor_tab, ch_lf, and s_leadingByte.

Referenced by byte_manager::parseCharRef().

xml_forceinline bool utf8_to_utf8 ( const ub1_t in,
size_t  count,
size_t &  processed,
size_t &  more 
)

checks if the input buffer is valid utf-8 string

Parameters:
in  input utf-8 buffer
count  input buffer length
processed  input char processed
more  more input chars required to process output utf-8 char, crop input chars

Definition at line 242 of file defxml.hpp.

References ch_cr, ch_hor_tab, and ch_lf.

Referenced by byte_source::convert_chars(), and byte_source::taste_buffer().

xml_forceinline void windowsN_to_utf8 ( encodingSchema  schema,
const ub1_t in,
size_t  count,
ub1_t out,
size_t &  converted,
size_t &  processed 
)

converts the Windows encoding to utf-8

Parameters:
schema  encoding schema
in  input Windows encoding buffer
count  input buffer length
out  output buffer
converted  input chars converted
processed  output chars processed

Definition at line 330 of file defxml.hpp.

References encoding_table_winodws_1251, s_leadingByte, and WINDOWS_1251.

Referenced by byte_source::convert_chars().



© Copyright Terimber 2003-.