mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-11 22:21:14 -03:00
Move "character has no narrow representation" to flog
This was a warning, which is kind of ridiculous, as it's inactionable error spew. Fixes #2815.
This commit is contained in:
@@ -414,7 +414,7 @@ std::string wcs2string(const wcstring &input) {
|
||||
std::memset(converted, 0, sizeof converted);
|
||||
size_t len = std::wcrtomb(converted, wc, &state);
|
||||
if (len == (size_t)-1) {
|
||||
debug(1, L"Wide character U+%4X has no narrow representation", wc);
|
||||
FLOGF(char_encoding, L"Wide character U+%4X has no narrow representation", wc);
|
||||
std::memset(&state, 0, sizeof(state));
|
||||
} else {
|
||||
result.append(converted, len);
|
||||
@@ -452,7 +452,7 @@ static char *wcs2str_internal(const wchar_t *in, char *out) {
|
||||
} else {
|
||||
size_t len = std::wcrtomb(&out[out_pos], in[in_pos], &state);
|
||||
if (len == (size_t)-1) {
|
||||
debug(1, L"Wide character U+%4X has no narrow representation", in[in_pos]);
|
||||
FLOGF(char_encoding, L"Wide character U+%4X has no narrow representation", in[in_pos]);
|
||||
std::memset(&state, 0, sizeof(state));
|
||||
} else {
|
||||
out_pos += len;
|
||||
|
||||
@@ -71,6 +71,7 @@ class category_list_t {
|
||||
category_t env_export{L"env-export", L"Changes to exported variables"};
|
||||
|
||||
category_t topic_monitor{L"topic-monitor", L"Internal details of the topic monitor"};
|
||||
category_t char_encoding{L"char-encoding", L"Character encoding issues"};
|
||||
};
|
||||
|
||||
/// The class responsible for logging.
|
||||
|
||||
Reference in New Issue
Block a user