|
|
@@ -415,9 +415,7 @@ public class AdminKnowledgeController {
|
|
|
return s;
|
|
|
}
|
|
|
// Quick check: if the first 200 bytes look like garbled CJK, try GBK
|
|
|
- for (int i = 0; i < header.length; i++) {
|
|
|
- header[i] = bytes[i];
|
|
|
- }
|
|
|
+ System.arraycopy(bytes, 0, header, 0, header.length);
|
|
|
String utf8Head = new String(header, StandardCharsets.UTF_8);
|
|
|
// If UTF-8 result contains replacement chars (�), it's likely GBK
|
|
|
if (utf8Head.contains("�")) {
|