-
Notifications
You must be signed in to change notification settings - Fork 6
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
Make an application for fixing source encoding #27
Comments
It only took a few minutes to change all documents manually. Then I only need a shell script detecting unexpected encodings as a part of the regression test. |
With the new file API, it should be easy to iterate over the files and check for common problems. This could also expand into a reusable static analysis tool giving hints about how to use the library efficiently, using a keyword in the build system. |
Migrating projects after breaking changes in the library could be used in this tool to allow keeping the library clean without causing too much trouble for developers. Templates can have the build feature enabled by default with comments about how it works. |
The difficult part is how to handle unknown source encodings without pestering the user with mundane tasks. Might need a back-up system for undoing changes and heuristics using programming language dictionaries looking for common keywords based on file format, to figure out unknown text encodings. |
The source code was written on Linux and the text editors default to only using line-feed (10). However, this project should be easy to read on Microsoft Windows as well and the source code should have a formating that works on most systems. This is a good time to start making a code formating tool converting into explicit UTF-8 with Cr-Lf breaks for *.cpp and Lf breaks for *.sh. Detecting accidental use of soft-tab would also be good, but the coder should be free to break most other rules when the need arises.
The text was updated successfully, but these errors were encountered: