我需要将 UTF-16 转换为 ANSI [英] I need convert UTF-16 to ANSI

查看:56
本文介绍了我需要将 UTF-16 转换为 ANSI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 .cmd 文件中将 UTF-16 转换为 ANSI?

How i can convert UTF-16 to ANSI in a .cmd file?

推荐答案

你的代码在它的开头有一个 UTF-16 LE 字节顺序标记,这是一种在 DosTips.通过十六进制编辑器将其删除,或将此代码保存为 deobfuscate.bat 并将您的脚本拖到其上:

Your code has a UTF-16 LE byte-order-marker at the beginning of it, which an obfuscation technique developed on DosTips. Either remove it via a hex editor, or save this code as deobfuscate.bat and drag your script onto it:

@echo on &setlocal
if "%~1"=="" exit /b
if /i "%~x1" neq ".bat" if /i "%~x1" neq ".cmd" exit /b
<"%~1" ((for /l %%N in (1 1 8) do pause)>nul&findstr "^">"%~n1___%~x1")

这篇关于我需要将 UTF-16 转换为 ANSI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆