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

Make an application for fixing source encoding #27

Open
Dawoodoz opened this issue Aug 22, 2020 · 4 comments
Open

Make an application for fixing source encoding #27

Dawoodoz opened this issue Aug 22, 2020 · 4 comments
Labels
portability Related to working on a certain operating system Tool A separate script or application that makes a task easier

Comments

@Dawoodoz
Copy link
Owner

Dawoodoz commented Aug 22, 2020

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.

@Dawoodoz Dawoodoz added portability Related to working on a certain operating system Tool A separate script or application that makes a task easier labels Aug 22, 2020
@Dawoodoz Dawoodoz added this to the First stable release milestone Aug 22, 2020
@Dawoodoz
Copy link
Owner Author

Dawoodoz commented Sep 5, 2020

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.

@Dawoodoz Dawoodoz removed this from the First stable release milestone Sep 5, 2020
@Dawoodoz
Copy link
Owner Author

Dawoodoz commented Apr 8, 2023

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.

@Dawoodoz Dawoodoz added the Low priority No rush to have this done, because other things are more urgent. label May 20, 2023
@Dawoodoz
Copy link
Owner Author

Dawoodoz commented Jun 17, 2023

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.

@Dawoodoz Dawoodoz removed the Low priority No rush to have this done, because other things are more urgent. label Jun 21, 2023
@Dawoodoz
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
portability Related to working on a certain operating system Tool A separate script or application that makes a task easier
Projects
None yet
Development

No branches or pull requests

1 participant