Commit d3a5b07
committed
fix: add GBK-to-UTF-8 encoding conversion for .sql/.txt/.java in GetSQLFromFile
The input_sql_file branch in GetSQLFromFile() was passing raw bytes from
controller.ReadFile() directly without encoding conversion. When a GBK-encoded
file was uploaded, the raw GBK bytes were stored into MySQL UTF-8 columns,
causing Error 1366 (Incorrect string value).
Added utils.ConvertToUtf8() calls for .sql/.txt and .java branches, consistent
with processArchiveEntry() which already handles encoding conversion for files
inside archives.
Fixes: BUG-0011 parent bb3f407 commit d3a5b07
1 file changed
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
131 | 135 | | |
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
135 | | - | |
| 139 | + | |
136 | 140 | | |
137 | 141 | | |
138 | | - | |
139 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
140 | 148 | | |
141 | 149 | | |
142 | 150 | | |
| |||
0 commit comments