updated to the new pikotools api: changed utf8 functions PascalCase to snake_case

This commit is contained in:
Tomasz Sowa 2021-05-21 00:32:29 +02:00
parent 34274ca230
commit 0ff900f626
5 changed files with 9 additions and 9 deletions

View File

@ -407,7 +407,7 @@ void BaseExpression::esc(wchar_t val, pt::TextStream & stream, const FT & field_
{ {
char utf8_buf[10]; char utf8_buf[10];
size_t utf8_len = pt::IntToUTF8((int)val, utf8_buf, sizeof(utf8_buf)); size_t utf8_len = pt::int_to_utf8((int)val, utf8_buf, sizeof(utf8_buf));
for(size_t a = 0 ; a < utf8_len ; ++a) for(size_t a = 0 ; a < utf8_len ; ++a)
{ {
@ -429,7 +429,7 @@ void BaseExpression::esc(const wchar_t * val, bool has_known_length, size_t len,
for(size_t i = 0 ; has_known_length ? (i < len) : val[i] != 0 ; ++i) for(size_t i = 0 ; has_known_length ? (i < len) : val[i] != 0 ; ++i)
{ {
size_t utf8_len = pt::IntToUTF8((int)val[i], utf8_buf, sizeof(utf8_buf)); size_t utf8_len = pt::int_to_utf8((int)val[i], utf8_buf, sizeof(utf8_buf));
for(size_t a = 0 ; a < utf8_len ; ++a) for(size_t a = 0 ; a < utf8_len ; ++a)
{ {

View File

@ -443,7 +443,7 @@ size_t DbConnector::unescape_hex_char(const char * value_str, wchar_t & field_va
int value_int; int value_int;
bool is_correct; bool is_correct;
len = pt::UTF8ToInt(utf8_str, utf8_str_len, value_int, is_correct); len = pt::utf8_to_int(utf8_str, utf8_str_len, value_int, is_correct);
len = len * 2; len = len * 2;
if( is_correct ) if( is_correct )
@ -548,7 +548,7 @@ void DbConnector::get_value(const char * value_str, wchar_t & field_value, const
int value_int; int value_int;
bool is_correct; bool is_correct;
pt::UTF8ToInt(value_str, value_int, is_correct); pt::utf8_to_int(value_str, value_int, is_correct);
if( is_correct ) if( is_correct )
{ {
@ -584,7 +584,7 @@ void DbConnector::get_value(const char * value_str, std::wstring & field_value,
{ {
if( field_type.use_utf8() ) if( field_type.use_utf8() )
{ {
pt::UTF8ToWide(value_str, field_value); pt::utf8_to_wide(value_str, field_value);
} }
else else
{ {

View File

@ -236,7 +236,7 @@ void Model::get_table_name(std::string & str, bool with_schema_name, ModelData *
pt::WTextStream stream; pt::WTextStream stream;
get_table_name(stream, with_schema_name, model_data, false); get_table_name(stream, with_schema_name, model_data, false);
pt::WideStreamToUTF8(stream, str, clear_string); pt::wide_stream_to_utf8(stream, str, clear_string);
} }

View File

@ -119,7 +119,7 @@ bool PostgreSQLConnector::do_query(const char * query_str, PostgreSQLQueryResult
if( err_msg ) if( err_msg )
{ {
pt::UTF8ToWide(err_msg, psql_result->error_msg); pt::utf8_to_wide(err_msg, psql_result->error_msg);
} }
if( log ) if( log )

View File

@ -85,7 +85,7 @@ const char * QueryResult::get_field_string_value(const char * column_name)
const char * QueryResult::get_field_string_value(const wchar_t * column_name) const char * QueryResult::get_field_string_value(const wchar_t * column_name)
{ {
pt::WideToUTF8(column_name, temp_column_name); pt::wide_to_utf8(column_name, temp_column_name);
return get_field_string_value(temp_column_name.c_str()); return get_field_string_value(temp_column_name.c_str());
} }
@ -98,7 +98,7 @@ int QueryResult::get_column_index(const char * column_name)
int QueryResult::get_column_index(const wchar_t * column_name) int QueryResult::get_column_index(const wchar_t * column_name)
{ {
pt::WideToUTF8(column_name, temp_column_name); pt::wide_to_utf8(column_name, temp_column_name);
return get_column_index(temp_column_name.c_str()); return get_column_index(temp_column_name.c_str());
} }