Repository navigation
fix(Utils): 处理配置/模板文件中的 UTF-8 BOM - #141
Merged
Merged
Conversation
新增 `trimBom` 与 `readTextWithoutBom` 工具方法,并在读取 配置、模板及远程索引文件时去除 BOM,避免部分编辑器 (如 Windows 记事本)保存文件时写入的 BOM 导致 JSON 解析抛出 JsonDecodingException。
|
@KaRuichin is attempting to deploy a commit to the dituon's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
问题描述
ganma模板的template.json是以UTF-8 with BOM格式保存的,这导致在启动时的加载模板过程中会输出以下报错:解决方案
很抱歉由于我的Java技术还不是很好,所以修复过程主要是经过 AI 的协助。
以下AI对本次修复的描述:
修复测试
我尝试构建并运行之后,数据文件文件夹不变,没有再次出现报错: