Repository navigation
tools: read the governance files as UTF-8 - #13
Merged
Merged
Conversation
PowerShell 5.1 decodes Get-Content -Raw with the ANSI code page unless it is told otherwise. The two governance JSON files happen to be ASCII today, so nothing breaks -- until a description or a comment carries Chinese, which is exactly what the other two repositories hit while applying their settings: ConvertFrom-Json rejected the file halfway through the UTF-8 bytes. Read both files explicitly as UTF-8. The skills and blog repositories already do. Signed-off-by: cadywang <cadywang@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明
PowerShell 5.1 的
Get-Content -Raw默认按 ANSI 代码页解码。两个 governance JSON 目前是纯 ASCII,所以没暴露;一旦
description或_comment出现中文,ConvertFrom-Json会解析失败——skills 与blog 仓库在施加设置时已经踩过这个坑(dry-run 直接报
Invalid object passed in)。现在两个文件都显式用
-Encoding UTF8读入。变更类型
影响面清单
测试
bash tests/verify-live.sh <client>:<port>设备与链路信息(涉及传输改动时必填):
base64/awk/od/md5sum)合并前清单
PROTOCOL.md与agent/*、cli/*四个实现已同步更新.tmp-*/、*.log、__pycache__/)<subsystem>: 祈使句摘要、正文 72 列折行,并带Signed-off-by:(git commit -s)<subsystem>: 祈使句摘要>(网页端 squash 会把它写成提交标题)CHANGELOG.md(如面向用户的行为有变化)SECURITY.md(不引入默认对外暴露、无鉴权的行为)关联 Issue
无独立 Issue。对齐 skills / blog 仓库的同名修复。