中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-12 04:00
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS批处理 & 脚本技术(批处理室) » How to save the output txt as Unicode format in batch processing
Printable Version  1,689 / 9
Floor1 nerfg002 Posted 2009-11-06 16:49
初级用户 Posts 24 Credits 24
As the title says. Suppose the following code:
echo hello>1.txt
How to make the 1.txt file save itself in Unicode format (equivalent to the effect of opening 1.txt with Notepad and saving as Unicode format)
If there are relatively convenient third-party DOS programs, please let the DX know, thanks a lot!

[ Last edited by nerfg002 on 2009-11-8 at 10:59 ]
Floor2 HAT Posted 2009-11-06 22:32
版主 Posts 5,017 Credits 9,023
Floor3 Evangel Posted 2009-11-06 23:06
初级用户 Posts 95 Credits 145
HAT moderator is just concise... It's shocking! There really is a /U...
Floor4 nerfg002 Posted 2009-11-07 00:06
初级用户 Posts 24 Credits 24
Thank you very much for the reply from moderator HAT, but the problem is still not solved. Although the output through the pipe is UNICODE characters, the format of the 1.txt file is still ASCII after writing.

[ Last edited by nerfg002 on 2009-11-7 at 00:33 ]
Floor5 HAT Posted 2009-11-07 10:43
版主 Posts 5,017 Credits 9,023
What the 3rd floor said is okay, and my test result here is also correct. Is it that your test steps are incorrect?
Floor6 nerfg002 Posted 2009-11-07 18:44
初级用户 Posts 24 Credits 24
Thanks for the help! Everyone helps!

[ Last edited by nerfg002 on 2009-11-8 at 15:39 ]
Floor7 radem Posted 2009-11-07 20:17
高级用户 Posts 383 Credits 691
Originally posted by nerfg002 at 2009-11-6 04:49 PM:
How to make the 1.txt file save itself as Unicode format (equivalent to the effect of opening 1.txt with Notepad and saving it as Unicode format)



Originally posted by nerfg002 at 2009-11-7 06:44 PM:
Maybe the moderator doesn't quite understand my intention or there is a problem with my system. I have solved it myself. Thank you for your help.
Share the method:
Create a new blank text file 2.txt and open it with Notepad, then save it as Unicode format, and then ...


LZ is awesome, solved it by himself like this.!!!
Floor8 Evangel Posted 2009-11-07 21:04
初级用户 Posts 95 Credits 145
Helplessly drifting by...
Floor9 lokeymei Posted 2009-11-08 23:25
新手上路 Posts 17 Credits 18
Please provide the specific Chinese content that needs to be translated so that I can assist you.
Floor10 yuan53770 Posted 2010-10-03 22:39
初级用户 Posts 40 Credits 67
Oh, is that okay? I'll give it a try
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023