Board logo

标题: [文本处理] ini文件使用命令替换后中文乱码,大神可以指导下 [打印本页]

作者: yuio4183740    时间: 2022-1-28 16:41     标题: ini文件使用命令替换后中文乱码,大神可以指导下

需要替换 欢迎光临 为 欢迎您,但是使用 bwfr - 替换文本中的多个字符串 替换号您字乱码,那位大神帮忙看看

文件是UTF-8 格式


[General]
Width = 1000
PagePrint = 0
AreaPrint = 0
Area_PageHead = 0
Area_Header = 0
Area_Detail = 0
Area_Total = 0
Area_Pay = 0
Area_Bottom = 0
Area_PageFeet = 0

[Header]
00 = 1,0,31,2,欢迎光临
01 = 2,0,31,2
43 = 3,0,1000,0
00 = 4,0,5,0,机号:
02 = 4,6,11,0
00 = 4,14,19,0,流水:
05 = 4,22,32,0
00 = 5,0,5,0,收银:
03 = 5,6,13,0
01 = 5,14,21,1,营业员:
34 = 5,22,31,0
06 = 6,0,11,0
07 = 6,12,22,0
25 = 6,22,31,0
00 = 7,0,38,0,条码  商品名称 数量 金额  折扣
作者: aloha20200628    时间: 2022-1-28 18:40

备注:本段代码须存为utf-8格式(如用notepad)后执行生效

@echo off & setlocal enabledelayedexpansion
chcp 65001
(for /f "delims=" %%s in (a.txt) do (set "ss=%%s" & echo,!ss:欢迎光临=欢迎您!))>a.new.txt
chcp 936
exit/b




欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2