Server line text-encoding-related fixes.
- Handle server lines that contain sequences which are invalid in the server encoding. Previously, these would cause the whole line to be interpreted in ISO-8859-1, but now they're simply replaced with an appropriate replacement character. - Removed prefs.utf8_locale. - Change default server encoding from system locale to UTF-8. - Always populate server->encoding with a non-null value - UTF-8. Fixes #1198
This commit is contained in:
@@ -970,9 +970,7 @@ hexchat_printf (hexchat_plugin *ph, const char *format, ...)
|
||||
void
|
||||
hexchat_command (hexchat_plugin *ph, const char *command)
|
||||
{
|
||||
char *command_nonconst;
|
||||
char *conv;
|
||||
gssize len = -1;
|
||||
char *command_utf8;
|
||||
|
||||
if (!is_session (ph->context))
|
||||
{
|
||||
@@ -981,11 +979,9 @@ hexchat_command (hexchat_plugin *ph, const char *command)
|
||||
}
|
||||
|
||||
/* scripts/plugins continue to send non-UTF8... *sigh* */
|
||||
command_nonconst = g_strdup (command);
|
||||
conv = text_validate (&command_nonconst, &len);
|
||||
handle_command (ph->context, command_nonconst, FALSE);
|
||||
g_free (conv);
|
||||
g_free (command_nonconst);
|
||||
command_utf8 = text_invalid_encoding_to_utf8 (command, -1, "UTF-8", NULL);
|
||||
handle_command (ph->context, command_utf8, FALSE);
|
||||
g_free (command_utf8);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user