1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 22:36:38 +02:00

Remove some unneeded iconv calls (for UTF-8 term)

This commit is contained in:
Sebastien Helleu
2006-11-08 15:29:14 +00:00
parent 855997623d
commit 3dcea50073
2 changed files with 26 additions and 2 deletions
+13 -1
View File
@@ -269,8 +269,14 @@ char *
weechat_iconv_to_internal (char *charset, char *string)
{
char *input, *output;
input = strdup (string);
/* optimize for UTF-8: if charset is NULL => we use term charset =>
if ths charset is already UTF-8, then no iconv needed */
if (local_utf8 && (!charset || !charset[0]))
return input;
if (input)
{
if (utf8_is_valid (input, NULL))
@@ -298,6 +304,12 @@ weechat_iconv_from_internal (char *charset, char *string)
char *input, *output;
input = strdup (string);
/* optimize for UTF-8: if charset is NULL => we use term charset =>
if ths charset is already UTF-8, then no iconv needed */
if (local_utf8 && (!charset || !charset[0]))
return input;
if (input)
{
utf8_normalize (input, '?');
+13 -1
View File
@@ -269,8 +269,14 @@ char *
weechat_iconv_to_internal (char *charset, char *string)
{
char *input, *output;
input = strdup (string);
/* optimize for UTF-8: if charset is NULL => we use term charset =>
if ths charset is already UTF-8, then no iconv needed */
if (local_utf8 && (!charset || !charset[0]))
return input;
if (input)
{
if (utf8_is_valid (input, NULL))
@@ -298,6 +304,12 @@ weechat_iconv_from_internal (char *charset, char *string)
char *input, *output;
input = strdup (string);
/* optimize for UTF-8: if charset is NULL => we use term charset =>
if ths charset is already UTF-8, then no iconv needed */
if (local_utf8 && (!charset || !charset[0]))
return input;
if (input)
{
utf8_normalize (input, '?');