mirror of
https://github.com/vim/vim.git
synced 2025-10-24 08:54:47 -04:00
patch 9.1.1223: wrong translation used for encoding failures
Problem: wrong translation for encoding failures because of using
literal "from" and "to" in the resulting error message
(RestorerZ)
Solution: use separate error messages for errors "from" and "to"
encoding errors.
fixes: #16898
closes: #16918
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -1339,7 +1339,7 @@ f_blob2str(typval_T *argvars, typval_T *rettv)
|
||||
vim_free(str);
|
||||
if (converted_str == NULL)
|
||||
{
|
||||
semsg(_(e_str_encoding_failed), "from", from_encoding);
|
||||
semsg(_(e_str_encoding_from_failed), from_encoding);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
@@ -1348,7 +1348,7 @@ f_blob2str(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
if (!utf_valid_string(converted_str, NULL))
|
||||
{
|
||||
semsg(_(e_str_encoding_failed), "from", p_enc);
|
||||
semsg(_(e_str_encoding_from_failed), p_enc);
|
||||
vim_free(converted_str);
|
||||
goto done;
|
||||
}
|
||||
@@ -1414,7 +1414,7 @@ f_str2blob(typval_T *argvars, typval_T *rettv)
|
||||
str = convert_string(str, p_enc, to_encoding);
|
||||
if (str == NULL)
|
||||
{
|
||||
semsg(_(e_str_encoding_failed), "to", to_encoding);
|
||||
semsg(_(e_str_encoding_to_failed), to_encoding);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user