Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct file encoding and line separators #1302

Merged
merged 1 commit into from
Jun 13, 2024
Merged

Conversation

ccyybn
Copy link
Contributor

@ccyybn ccyybn commented Jun 10, 2024

刚好写过一个脚本更正 file encoding,现在统一用脚本修正了一下,建议用IDEA review Files changed,github 的 diff 比较智障

image

更正清单

file encoding

include/resource.h [utf_16] -> [utf-8]
include/VersionHelpers.hpp [gb2312] -> [utf-8]
WeaselDeployer/resource.h [utf_16] -> [utf-8]
WeaselUI/StandardLayout.cpp [gb2312] -> [utf-8]

line separators

build.bat -> [LF]
env.bat.template -> [LF]
env.vs2019.bat -> [LF]
env.vs2022.bat -> [LF]
github.install.bat -> [LF]
include/logging.h -> [LF]
include/resource.h -> [LF]
include/ResponseParser.h -> [LF]
include/RimeWithWeasel.h -> [LF]
include/WeaselConstants.h -> [LF]
include/WeaselIPC.h -> [LF]
include/WeaselIPCData.h -> [LF]
include/WeaselUI.h -> [LF]
include/WeaselUtility.h -> [LF]
include/wtl/atlapp.h -> [LF]
include/wtl/atlcrack.h -> [LF]
include/wtl/atlctrls.h -> [LF]
include/wtl/atlctrlw.h -> [LF]
include/wtl/atlctrlx.h -> [LF]
include/wtl/atlddx.h -> [LF]
include/wtl/atldlgs.h -> [LF]
include/wtl/atlfind.h -> [LF]
include/wtl/atlframe.h -> [LF]
include/wtl/atlgdi.h -> [LF]
include/wtl/atlmisc.h -> [LF]
include/wtl/atlprint.h -> [LF]
include/wtl/atlres.h -> [LF]
include/wtl/atlscrl.h -> [LF]
include/wtl/atlsplit.h -> [LF]
include/wtl/atltheme.h -> [LF]
include/wtl/atluser.h -> [LF]
include/wtl/atlwinx.h -> [LF]
install-clang-format.bat -> [LF]
INSTALL.md -> [LF]
install_boost.bat -> [LF]
LICENSE.txt -> [LF]
output/7-zip-license.txt -> [LF]
output/check_windows_version.js -> [LF]
output/data/weasel.yaml -> [LF]
output/install.bat -> [LF]
output/rime-install-config.bat -> [LF]
output/stop_service.bat -> [LF]
output/sudo.js -> [LF]
output/uninstall.bat -> [LF]
README.md -> [LF]
RimeWithWeasel/ReadMe.txt -> [LF]
RimeWithWeasel/RimeWithWeasel.cpp -> [LF]
RimeWithWeasel/RimeWithWeasel.vcxproj.filters -> [LF]
RimeWithWeasel/stdafx.cpp -> [LF]
RimeWithWeasel/stdafx.h -> [LF]
RimeWithWeasel/targetver.h -> [LF]
RimeWithWeasel/WeaselUtility.cpp -> [LF]
test/TestResponseParser/ReadMe.txt -> [LF]
test/TestResponseParser/stdafx.cpp -> [LF]
test/TestResponseParser/stdafx.h -> [LF]
test/TestResponseParser/targetver.h -> [LF]
test/TestResponseParser/TestResponseParser.cpp -> [LF]
test/TestResponseParser/TestResponseParser.vcxproj.filters -> [LF]
test/TestWeaselIPC/ReadMe.txt -> [LF]
test/TestWeaselIPC/stdafx.cpp -> [LF]
test/TestWeaselIPC/stdafx.h -> [LF]
test/TestWeaselIPC/targetver.h -> [LF]
test/TestWeaselIPC/TestWeaselIPC.cpp -> [LF]
test/TestWeaselIPC/TestWeaselIPC.vcxproj.filters -> [LF]
weasel.props.template -> [LF]
weasel.sln -> [LF]
WeaselDeployer/Configurator.cpp -> [LF]
WeaselDeployer/Configurator.h -> [LF]
WeaselDeployer/DictManagementDialog.cpp -> [LF]
WeaselDeployer/DictManagementDialog.h -> [LF]
WeaselDeployer/resource.h -> [LF]
WeaselDeployer/stdafx.cpp -> [LF]
WeaselDeployer/stdafx.h -> [LF]
WeaselDeployer/SwitcherSettingsDialog.cpp -> [LF]
WeaselDeployer/SwitcherSettingsDialog.h -> [LF]
WeaselDeployer/targetver.h -> [LF]
WeaselDeployer/UIStyleSettings.cpp -> [LF]
WeaselDeployer/UIStyleSettings.h -> [LF]
WeaselDeployer/UIStyleSettingsDialog.cpp -> [LF]
WeaselDeployer/UIStyleSettingsDialog.h -> [LF]
WeaselDeployer/WeaselDeployer.cpp -> [LF]
WeaselDeployer/WeaselDeployer.h -> [LF]
WeaselDeployer/WeaselDeployer.vcxproj.filters -> [LF]
WeaselIME/dllmain.cpp -> [LF]
WeaselIME/ime.cpp -> [LF]
WeaselIME/KeyEvent.cpp -> [LF]
WeaselIME/KeyEvent.h -> [LF]
WeaselIME/ReadMe.txt -> [LF]
WeaselIME/resource.h -> [LF]
WeaselIME/stdafx.cpp -> [LF]
WeaselIME/stdafx.h -> [LF]
WeaselIME/targetver.h -> [LF]
WeaselIME/weasel.def -> [LF]
WeaselIME/WeaselIME.cpp -> [LF]
WeaselIME/WeaselIME.h -> [LF]
WeaselIME/WeaselIME.vcxproj.filters -> [LF]
WeaselIPC/ActionLoader.cpp -> [LF]
WeaselIPC/ActionLoader.h -> [LF]
WeaselIPC/Committer.cpp -> [LF]
WeaselIPC/Committer.h -> [LF]
WeaselIPC/ContextUpdater.cpp -> [LF]
WeaselIPC/ContextUpdater.h -> [LF]
WeaselIPC/Deserializer.cpp -> [LF]
WeaselIPC/Deserializer.h -> [LF]
WeaselIPC/ReadMe.txt -> [LF]
WeaselIPC/ResponseParser.cpp -> [LF]
WeaselIPC/stdafx.cpp -> [LF]
WeaselIPC/stdafx.h -> [LF]
WeaselIPC/targetver.h -> [LF]
WeaselIPC/WeaselClientImpl.cpp -> [LF]
WeaselIPC/WeaselClientImpl.h -> [LF]
WeaselIPC/WeaselIPC.vcxproj.filters -> [LF]
WeaselIPCServer/ReadMe.txt -> [LF]
WeaselIPCServer/stdafx.cpp -> [LF]
WeaselIPCServer/stdafx.h -> [LF]
WeaselIPCServer/targetver.h -> [LF]
WeaselIPCServer/WeaselIPCServer.vcxproj.filters -> [LF]
WeaselIPCServer/WeaselServerImpl.cpp -> [LF]
WeaselIPCServer/WeaselServerImpl.h -> [LF]
WeaselServer/resource.h -> [LF]
WeaselServer/stdafx.cpp -> [LF]
WeaselServer/stdafx.h -> [LF]
WeaselServer/WeaselServer.cpp -> [LF]
WeaselServer/WeaselServer.h -> [LF]
WeaselServer/WeaselServer.vcxproj -> [LF]
WeaselServer/WeaselServer.vcxproj.filters -> [LF]
WeaselSetup/imesetup.cpp -> [LF]
WeaselSetup/resource.h -> [LF]
WeaselSetup/stdafx.cpp -> [LF]
WeaselSetup/stdafx.h -> [LF]
WeaselSetup/WeaselSetup.cpp -> [LF]
WeaselSetup/WeaselSetup.h -> [LF]
WeaselSetup/WeaselSetup.vcxproj.filters -> [LF]
WeaselTSF/dllmain.cpp -> [LF]
WeaselTSF/ReadMe.txt -> [LF]
WeaselTSF/stdafx.cpp -> [LF]
WeaselTSF/stdafx.h -> [LF]
WeaselTSF/targetver.h -> [LF]
WeaselTSF/WeaselTSF.cpp -> [LF]
WeaselTSF/WeaselTSF.h -> [LF]
WeaselTSF/WeaselTSF.vcxproj -> [LF]
WeaselTSF/WeaselTSF.vcxproj.filters -> [LF]
WeaselUI/FullScreenLayout.cpp -> [LF]
WeaselUI/GdiplusBlur.cpp -> [LF]
WeaselUI/GdiplusBlur.h -> [LF]
WeaselUI/HorizontalLayout.cpp -> [LF]
WeaselUI/Layout.cpp -> [LF]
WeaselUI/ReadMe.txt -> [LF]
WeaselUI/StandardLayout.cpp -> [LF]
WeaselUI/stdafx.cpp -> [LF]
WeaselUI/stdafx.h -> [LF]
WeaselUI/targetver.h -> [LF]
WeaselUI/VerticalLayout.cpp -> [LF]
WeaselUI/VHorizontalLayout.cpp -> [LF]
WeaselUI/VHorizontalLayout.h -> [LF]
WeaselUI/WeaselPanel.cpp -> [LF]
WeaselUI/WeaselPanel.h -> [LF]
WeaselUI/WeaselUI.cpp -> [LF]
WeaselUI/WeaselUI.vcxproj -> [LF]
WeaselUI/WeaselUI.vcxproj.filters -> [LF]

@ccyybn
Copy link
Contributor Author

ccyybn commented Jun 10, 2024

@fxliang
Copy link
Contributor

fxliang commented Jun 11, 2024

不要急,这个commit改动影响可能较大,要慢慢测。如果有代码中直接用常量字符串的有可能有问题。

@ccyybn
Copy link
Contributor Author

ccyybn commented Jun 11, 2024

@fxliang 要不统一成CRLF,我发现visual studio 编辑资源后,会自动把resource.h改成CRLF,编码倒是会保持UTF-8不变

@ccyybn
Copy link
Contributor Author

ccyybn commented Jun 11, 2024

@fxliang
文件编码只有这 四个不正常

include/resource.h [utf_16] -> [utf-8]
include/VersionHelpers.hpp [gb2312] -> [utf-8]
WeaselDeployer/resource.h [utf_16] -> [utf-8]
WeaselUI/StandardLayout.cpp [gb2312] -> [utf-8]

其他都是换行不一致

@ccyybn
Copy link
Contributor Author

ccyybn commented Jun 11, 2024

@fxliang
我先把编码提交了,只有四个文件

image

@fxliang
Copy link
Contributor

fxliang commented Jun 11, 2024

注释直接改英文算了,又没多复杂

@ccyybn
Copy link
Contributor Author

ccyybn commented Jun 11, 2024

注释直接改英文算了,又没多复杂

中文注释在整个项目里有很多,不过其他地方都是UTF-8编码,只有这里两个文件是GB2312编码

@fxliang fxliang merged commit 2ca5a52 into rime:master Jun 13, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants