fix(mysql): repair encoded DDL comments

This commit is contained in:
zipg authored and GitHub committed 2026-08-13 19:24:30 +08:00
1 parent 44cb278257
commit a640809c61
2 files changed
+163 -4

No files matched your search

+1 -1
View File
@@ -3573,7 +3573,7 @@ fn normalize_mysql_column_charset_metadata(columns: &mut [ColumnInfo], table_col
/// Example: "主键" → UTF-8 bytes [E4 B8 BB E9 94 AE]
/// → each byte → CP1252 char → UTF-8 re-encoded → garbled text
/// → reversal: map each char back to its CP1252 byte, decode as UTF-8
pub(super) fn fix_potential_double_encoding(s: &str) -> String {
pub(crate) fn fix_potential_double_encoding(s: &str) -> String {
// Map each character to its CP1252 byte value
let mut bytes = Vec::with_capacity(s.len());
for c in s.chars() {