浏览代码

u8凭证导出乱码优化

hxh 4 月之前
父节点
当前提交
5c4173e5b7
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/custom/restcontroller/sale/cashbill/TxtFactory.java

+ 4 - 0
src/custom/restcontroller/sale/cashbill/TxtFactory.java

@@ -26,6 +26,10 @@ public class TxtFactory {
         try {
             PrintWriter out = new PrintWriter(this.filepath, StandardCharsets.UTF_8);
 
+
+            out.write(0xEF);
+            out.write(0xBB);
+            out.write(0xBF);
             // 写入文本
             out.println(str);
             // 确保所有缓冲的输出都被写出