Skip to content

Commit

Permalink
更改 所有注册表编码为UTF-16 LE
Browse files Browse the repository at this point in the history
  • Loading branch information
xrgzs committed Sep 25, 2024
1 parent 02322c7 commit 9a9bb86
Show file tree
Hide file tree
Showing 72 changed files with 42 additions and 0 deletions.
Binary file modified osc/apifiles/WDEnable.reg
Binary file not shown.
Binary file modified osc/apifiles/cleanup.reg
Binary file not shown.
Binary file modified osc/optimize/reg/all/WMP不显示首次使用对话框.reg
Binary file not shown.
Binary file modified osc/optimize/reg/all/flash中国版去除广告.reg
Binary file not shown.
Binary file modified osc/optimize/reg/all/ie相关.reg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified osc/optimize/reg/all/快速关机禁止弹窗确认.reg
Binary file not shown.
Binary file modified osc/optimize/reg/all/忽略未签名的驱动提示.reg
Binary file not shown.
Binary file modified osc/optimize/reg/all/桌面图标相关.reg
Binary file not shown.
Binary file modified osc/optimize/reg/all/禁止自动播放.reg
Binary file not shown.
Binary file modified osc/optimize/reg/all/禁用按5次Shift粘连提示.reg
Binary file not shown.
Binary file modified osc/optimize/reg/all/系统还原.reg
Binary file not shown.
Binary file modified osc/optimize/reg/all/网络设置优化.reg
Binary file not shown.
Binary file modified osc/optimize/reg/all/蓝屏时自动重启.reg
Binary file not shown.
Binary file modified osc/optimize/reg/all/设置IE搜索引擎.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt5/explorer_nt5.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt5/iehp_nt5.reg
Binary file not shown.
Binary file not shown.
Binary file modified osc/optimize/reg/nt5/始终在任务栏托盘显示所有图标.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt5/将语言栏隐藏到任务栏.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt5/开始菜单显示运行.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt5/显示快捷方式小箭头.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt5/显示隐藏文件及所有文件扩展名.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt5/自由天空xp系统优化方案节选.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt5/隐藏语言栏上的帮助按钮.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6.1/个性化.reg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified osc/optimize/reg/nt6.1/取消-显示操作中心任务栏托盘.reg
Binary file not shown.
Binary file not shown.
Binary file modified osc/optimize/reg/nt6.1/开始菜单显示运行.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6.1/禁用Windows Defender.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6.x/Cortana.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6.x/IE不跳转到Edge.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6.x/Win10更新.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6.x/iehp_nt10.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6.x/个性化.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6.x/任务栏相关.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6.x/关掉win10系统自动维护功能.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6.x/关闭WDAC.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6.x/启动故障恢复.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6.x/开启用户登录设置选项.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6.x/开始菜单锁屏.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6.x/微软拼音开启云候选.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6.x/禁止1809隐私设置提示.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6.x/隐私建议优化.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6/EnableHttpWebDav.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6/NT6系统加速.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6/OneDrive不随系统启动.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6/RPC打印机修复.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6/UAC调整为从不通知.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6/iehp_nt6.reg
Binary file not shown.
Binary file not shown.
Binary file modified osc/optimize/reg/nt6/加速系统和程序启动.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6/取消-任务栏使用小图标.reg
Binary file not shown.
Binary file not shown.
Binary file modified osc/optimize/reg/nt6/将语言栏隐藏到任务栏.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6/开始菜单显示运行.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6/当任务栏被占满时始终合并.reg
Binary file not shown.
Binary file not shown.
Binary file modified osc/optimize/reg/nt6/收起资源管理器功能区.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6/显示快捷方式小箭头.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6/显示隐藏文件及所有文件扩展名.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6/更新相关.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6/桌面图标.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6/禁止CEIP.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6/设置控制面板查看方式为类别.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6/资源管理器隐私优化.reg
Binary file not shown.
Binary file modified osc/optimize/reg/nt6/隐藏语言栏上的帮助按钮.reg
Binary file not shown.
Binary file modified osc/themerec/touch.reg
Binary file not shown.
42 changes: 42 additions & 0 deletions utils/ConvertEncoding.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 定义尝试的编码列表
$encodings = [System.Text.Encoding]::UTF8, [System.Text.Encoding]::Unicode, [System.Text.Encoding]::GetEncoding("GB2312"), [System.Text.Encoding]::ASCII, [System.Text.Encoding]::GetEncoding("Big5")

# 获取所有 .reg 文件
$files = Get-ChildItem "*.reg" -Recurse

foreach ($file in $files) {
$isCorrect = $false
foreach ($encoding in $encodings) {
try {
$content = [System.IO.File]::ReadAllText($file.FullName, $encoding)
Write-Host "$content" -BackgroundColor DarkGray
Write-Host "尝试使用 $($encoding.WebName) 编码读取文件 '$($file.Name)'。" -ForegroundColor Green
Write-Host "这是正常的文件吗?(y/n)" -ForegroundColor Yellow
$answer = Read-Host
if ($answer.ToLower() -eq 'y') {
$isCorrect = $true
break
}
} catch {
Write-Host "使用 $($encoding.WebName) 编码读取文件失败。"
}
}

if (-not $isCorrect) {
Write-Host "请指定正确的编码:"
$customEncodingName = Read-Host
$customEncoding = [System.Text.Encoding]::GetEncoding($customEncodingName)

try {
$content = [System.IO.File]::ReadAllText($file.FullName, $customEncoding)
Write-Host "使用自定义编码 '$customEncodingName' 成功读取文件。"
} catch {
Write-Host "使用自定义编码 '$customEncodingName' 读取文件失败。"
continue
}
}

# 转换文件为 UTF-16LE 编码
[System.IO.File]::WriteAllText($file.FullName, $content, [System.Text.Encoding]::Unicode)
Write-Host "文件 '$($file.Name)' 已成功转换为 UTF-16LE 编码。"
}

0 comments on commit 9a9bb86

Please sign in to comment.