Scripts
claider
这个作者很懒,什么都没留下…
展开
-
Ps1文件中包含汉字的参数可能因格式无法执行
Powershell版本:PSVersion 2.0。出错提示 缺少终止符:'。环境:Windows 7。原创 2024-04-24 15:56:30 · 328 阅读 · 0 评论 -
gvim编辑过的文件,由Powershell ISE打开,中文显示为乱码
简单快速解决:在gvim中set fileencoding = cp936,保存。再用Powershell ISE打开就没有乱码了。原创 2024-04-03 13:07:55 · 138 阅读 · 0 评论 -
Powershell中Get-ChildItem/Select-String 搜索汉字字符串适应多种编码的处理
如果不进行上述指定,则不能搜索到上述fooA.txt文件。仅能够搜索到 fooU.txt、fooUTF8.txt、fooUnicodeBigEnd.txt。Get-ChildItem -Path . -Filter 'foo*.txt' | Select-String -Pattern '证.*'gvim查看fileencoding。原创 2024-04-17 09:56:01 · 181 阅读 · 0 评论