#include <stdlib.h>
#include <stdio.h>
#include "utrac.h"
#include "debug.h"
Include dependency graph for ut_conversion.c:
Go to the source code of this file.
Functions | |
bool | is_ext (char c) |
Test if c is an extended character. | |
int | ut_size_unicode (ulong unicode) |
Return the size in byte of an Unicode character in UTF-8. | |
ulong | ut_utf8c_to_unicode (char **src_p) |
Convert an UTF-8 character to Unicode scalar value. | |
void | ut_unicode_to_utf8c (ulong unicode, char **dst_p) |
Convert an Unicode scalar value to UTF-8 character. | |
int | ut_size_char (char **src_p, UtCharsetIndex src_charset, UtCharsetIndex dst_charset) |
Return size in byte of a character after conversion. | |
void | ut_conv_char (char **src_p, char **dst_p, UtCharsetIndex src_charset, UtCharsetIndex dst_charset) |
Convert a character. | |
void | ut_insert_eol (char **dst_p, UtEolType dst_eol) |
uint | ut_count_ext_char (UtText *text) |
Count the number of extended character in a text. | |
int | ut_size_difference (UtText *src_text, UtText *dst_text) |
Return the difference between the size of a text and its size after conversion. | |
UtCode | ut_conversion_pass (UtText *src_text, UtText *dst_text) |
Convert extended characters and EOL. |
ASSERT sur tous les parametres.
Definition in file ut_conversion.c.
|
Convert a character.
Definition at line 259 of file ut_conversion.c. References UtSession::charset, UtSession::charset_default, UtSession::nomapping_char, UtCharset::type, UtCharset::unicode, ut_unicode_to_utf8c(), UT_UNSET, and ut_utf8c_to_unicode(). Referenced by ut_conversion_pass(). |
Here is the call graph for this function:
|
Convert extended characters and EOL. The conversion consists to :
Definition at line 539 of file ut_conversion.c. References UtText::charset, UtText::data, UtText::eol, UtText::eol_alt, is_ext(), UtSession::progress_function, UtText::size, ut_conv_char(), ut_count_ext_char(), UT_PROCESS_STEP, ut_size_difference(), and ut_update_progress(). Referenced by ut_convert(). |
Here is the call graph for this function:
|
Return size in byte of a character after conversion.
Definition at line 203 of file ut_conversion.c. References UtSession::charset, UtSession::charset_default, UtSession::nomapping_char, UtCharset::type, UtCharset::unicode, ut_size_unicode(), UT_UNSET, and ut_utf8c_to_unicode(). |
Here is the call graph for this function:
|
Return the difference between the size of a text and its size after conversion.
Definition at line 363 of file ut_conversion.c. References UtText::charset, UtSession::charset, UtText::distribution, UtText::eol, UtText::eol_alt, UtText::nb_lines, UtText::nb_lines_alt, UtSession::nomapping_char, UtCharset::type, UtCharset::unicode, ut_count_ext_char(), UT_EOL_BSN, UT_EOL_MIX, UT_EOL_NUL, ut_size_unicode(), and UT_UNSET. Referenced by ut_conversion_pass(). |
Here is the call graph for this function:
|
Return the size in byte of an Unicode character in UTF-8.
Definition at line 82 of file ut_conversion.c. Referenced by ut_size_char(), and ut_size_difference(). |
|
Convert an Unicode scalar value to UTF-8 character.
Definition at line 170 of file ut_conversion.c. Referenced by ut_conv_char(). |
|
Convert an UTF-8 character to Unicode scalar value.
=10xx xxxx Definition at line 114 of file ut_conversion.c. References ut_print_binary(). Referenced by ut_conv_char(), and ut_size_char(). |
Here is the call graph for this function: