Bug 166095 - Opening and then saving a csv file alters character encoding
Summary: Opening and then saving a csv file alters character encoding
Status: RESOLVED DUPLICATE of bug 166208
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.2.1.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-08 20:44 UTC by Joseph Hundley
Modified: 2025-06-04 15:06 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
csv file before it is opened (661 bytes, text/csv)
2025-04-10 12:27 UTC, Joseph Hundley
Details
csv file after it has been opened (700 bytes, text/csv)
2025-04-10 12:36 UTC, Joseph Hundley
Details
Screenshot text impor window (45.13 KB, image/png)
2025-04-10 21:31 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Hundley 2025-04-08 20:44:55 UTC
Description:
My university's Learning Management system exports gradebooks as CSV files where each line begins and ends with #, and expects them to come back in the same format. If I try to use LibreOffice to make even minor edits, it will alter all of these characters. For example, I download the file. I open in nano. The first line is "#56987425,Vickie.Brewer,42,38,89,77,E.... "
I open in LibreOffice and change the 42 to 43. Now the first line is
"+ACM-56987425,Vickie.Brewer,43,38,89,77,E...." This is undesirable. LibreOffice was not asked to edit the first cell, and should not be editing things it was not asked to edit. 

Steps to Reproduce:
1.Create a csv file which contains '#'
2.Open in LibreOffice, make a change, and then save.

Actual Results:
File is altered in ways that only become visible when it is opened with a different software.

Expected Results:
One should be able to expect that the software will not make invisible changes which it has not been asked to make. 


Reproducible: Always


User Profile Reset: Yes

Additional Info:
No other information. Why is this field required?
Comment 1 m_a_riosv 2025-04-10 00:25:14 UTC
Please attach a sample file, reduce the size as much as possible without private information, 
and paste the information in Menu/Help/About LibreOffice, there is a copy icon.
Comment 2 Joseph Hundley 2025-04-10 12:27:46 UTC
Created attachment 200271 [details]
csv file before it is opened
Comment 3 Joseph Hundley 2025-04-10 12:36:49 UTC
Created attachment 200273 [details]
csv file after it has been opened

One edit has been made by the user: change 42 to 43 in row 2, column 3. Various other changes (replace all instances of '#' by '+ACM-', all instances of '-' by '+AC0-', all instances of '!' by '+ACE-') seem to occur automatically.
Comment 4 m_a_riosv 2025-04-10 21:31:23 UTC
Created attachment 200286 [details]
Screenshot text impor window

See the text import window that I think works fine.

I think the matter is to avoid the first '#' disappear, if the column is treated  as number, not as text.
Comment 5 Mike Kaganski 2025-06-04 15:06:59 UTC

*** This bug has been marked as a duplicate of bug 166208 ***