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

Using commas in description field messes up exported hours.csv #88

Open
Pohli opened this issue Apr 26, 2024 · 2 comments
Open

Using commas in description field messes up exported hours.csv #88

Pohli opened this issue Apr 26, 2024 · 2 comments

Comments

@Pohli
Copy link

Pohli commented Apr 26, 2024

When adding hours there's an entry field for optional descriptions at the bottom. If I use the comma character there (which I did alot) and then export hours to a csv file the commas will mess up the csv file cause commas are used as seperator character in the csv files.
If fix is not possible there should be at least a warning somewhere.

@olpeh
Copy link
Owner

olpeh commented May 2, 2024

Hey. I'm not actively maintaining this project, but yeah this project is a huge pile of 💩

Do you have any suggestions on how to fix this (properly)? One option I can think of is using semicolon as the separator when exporting to CSV. A better approach I guess would be to allow all kinds of special characters in the description field.

@Pohli Pohli changed the title Using commas in description field messes up exported hours.cvs Using commas in description field messes up exported hours.csv May 5, 2024
@Pohli
Copy link
Author

Pohli commented May 5, 2024

I'm not a coder but I had a look at the Wikipedia entry about csv files. If you use semicolon as separator it could also make problems to view the files correctly. My exported call lists from my router are also in csv format with semicolon as separator indicated by the first line: sep=;
But the default app for csv files on SFOS, Documents, doesn't understand that and shows garbage.
I suggest to enclose the data (if there's any) from the description field with double quotes and replace all double quotes which are part of the data with two double quotes. Example:
"morning" shift, production
will be changed into
"""morning"" shift, production"
That way it will show correctly in the SFOS Documents app at least.

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

No branches or pull requests

2 participants