summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2005-07-11 14:34:20 +0000
committerSebastien Helleu <flashcode@flashtux.org>2005-07-11 14:34:20 +0000
commitd4d065253eafcf58f3afb97f7ec9039c09894c67 (patch)
tree538252ab7f67bff8e419c1475cc65bd350bab2a9
parent673e7680af503c5d6d0d03fb8e1c339a3cd0c3eb (diff)
downloadweechat-d4d065253eafcf58f3afb97f7ec9039c09894c67.zip
Topic completion now decodes UTF-8 string
-rw-r--r--ChangeLog1
-rw-r--r--src/common/completion.c11
-rw-r--r--weechat/ChangeLog1
-rw-r--r--weechat/src/common/completion.c11
4 files changed, 20 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index d740c93ee..1e8adb4a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@ ChangeLog - 2005-07-11
Versoin 0.1.4 (under dev!):
+ * topic completion now decodes UTF-8 string
* fixed bug with IRC URL on command line (irc://)
* new keyboard management: keys are setup in config file, new command
/key was added and some new default keys were added
diff --git a/src/common/completion.c b/src/common/completion.c
index ef3838b51..6bb452d20 100644
--- a/src/common/completion.c
+++ b/src/common/completion.c
@@ -102,7 +102,7 @@ completion_build_list (t_completion *completion, void *channel)
int i, j;
t_irc_server *ptr_server;
t_irc_channel *ptr_channel;
- char *pos, option_name[256];
+ char *pos, option_name[256], *string;
t_weechat_alias *ptr_alias;
t_config_option *option;
void *option_value;
@@ -525,9 +525,16 @@ completion_build_list (t_completion *completion, void *channel)
|| !((t_irc_channel *)channel)->topic[0])
completion_stop (completion);
else
+ {
+ string = weechat_convert_encoding (cfg_look_charset_decode,
+ (cfg_look_charset_internal && cfg_look_charset_internal[0]) ?
+ cfg_look_charset_internal : local_charset,
+ ((t_irc_channel *)channel)->topic);
weelist_add (&completion->completion_list,
&completion->last_completion,
- ((t_irc_channel *)channel)->topic);
+ string);
+ free (string);
+ }
}
else
completion_stop (completion);
diff --git a/weechat/ChangeLog b/weechat/ChangeLog
index d740c93ee..1e8adb4a5 100644
--- a/weechat/ChangeLog
+++ b/weechat/ChangeLog
@@ -5,6 +5,7 @@ ChangeLog - 2005-07-11
Versoin 0.1.4 (under dev!):
+ * topic completion now decodes UTF-8 string
* fixed bug with IRC URL on command line (irc://)
* new keyboard management: keys are setup in config file, new command
/key was added and some new default keys were added
diff --git a/weechat/src/common/completion.c b/weechat/src/common/completion.c
index ef3838b51..6bb452d20 100644
--- a/weechat/src/common/completion.c
+++ b/weechat/src/common/completion.c
@@ -102,7 +102,7 @@ completion_build_list (t_completion *completion, void *channel)
int i, j;
t_irc_server *ptr_server;
t_irc_channel *ptr_channel;
- char *pos, option_name[256];
+ char *pos, option_name[256], *string;
t_weechat_alias *ptr_alias;
t_config_option *option;
void *option_value;
@@ -525,9 +525,16 @@ completion_build_list (t_completion *completion, void *channel)
|| !((t_irc_channel *)channel)->topic[0])
completion_stop (completion);
else
+ {
+ string = weechat_convert_encoding (cfg_look_charset_decode,
+ (cfg_look_charset_internal && cfg_look_charset_internal[0]) ?
+ cfg_look_charset_internal : local_charset,
+ ((t_irc_channel *)channel)->topic);
weelist_add (&completion->completion_list,
&completion->last_completion,
- ((t_irc_channel *)channel)->topic);
+ string);
+ free (string);
+ }
}
else
completion_stop (completion);