Add a warning counter

This commit is contained in:
2025-05-22 09:06:55 +08:00
parent 795832fd3c
commit f64a702ef5
5 changed files with 22 additions and 8 deletions

View File

@@ -47,6 +47,7 @@ pub fn encode_string(
"Warning: Some characters could not be encoded in Shift-JIS: {}",
data
);
crate::COUNTER.inc_warning();
}
Ok(result.0.to_vec())
}
@@ -60,6 +61,7 @@ pub fn encode_string(
"Warning: Some characters could not be encoded in GB2312: {}",
data
);
crate::COUNTER.inc_warning();
}
Ok(result.0.to_vec())
}