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

Spec should specify an encoding #10

Open
mpcjanssen opened this issue Oct 2, 2017 · 5 comments
Open

Spec should specify an encoding #10

mpcjanssen opened this issue Oct 2, 2017 · 5 comments
Milestone

Comments

@mpcjanssen
Copy link

The spec should include the expected encoding of a proper todo file. At the moment a client cannot properly open a todo.txt file created on a system with a different encoding.

There are two ways to fix this:

  1. Include encoding metadata in the todo.txt file
  2. Specify UTF-8

My preference would definitely be number 2.

@karbassi
Copy link
Member

karbassi commented Oct 2, 2017

My vote is UTF-8.

This would solve the line ending problems as well.

@karbassi karbassi added this to the 2.0.0 milestone Oct 2, 2017
@mpcjanssen
Copy link
Author

For line endings I would allow \r \n and \r\n.

@karbassi karbassi mentioned this issue Oct 3, 2017
2 tasks
@heX16
Copy link

heX16 commented Feb 7, 2018

My vote is "UTF-8 with BOM".

Because "UTF-8" some times have problem with encoding detection (and incorrect definitions like ANSI (and damage to characters)).

@koppor
Copy link

koppor commented Jan 11, 2021

I am working in a project for reference management. We store bibliographic data in BibTeX files, which are plain-text sort-of-key-value files.

We also stored the encoding information at the beginning of the file. We came to the conclusion that UTF-8 is widely adopted and thus, we support UTF-8 only. Most users should be able to use recode (or Notepad++ and alike) to change the encoding.

IMHO BOM should not be enforced. A todo.txt file is still a text file which should be editable by any text editor and versionable by any version control system.

@mpcjanssen
Copy link
Author

BOM is really only needed for broken windows tools (such as Excel) but it would mean any todo.txt file is not a valid ASCII file anymore (even when only characters in the ASCII range are used).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants