Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#3807 closed enhancement (fixed)

OMEdit should have a setting for the line endings (LF/CRLF/native)

Reported by: Adrian Pop Owned by: Adeel Asghar
Priority: high Milestone:
Component: OMEdit Version:
Keywords: Cc:

Description

Currently we enforce Linux line endings (LF) on Windows too for the .mo files we generate. This should be configurable in OMEdit.

I guess we would need to change unparsing in OMC and to add this setting to the OMC API.

Change History (7)

comment:1 by Martin Sjölund, 9 years ago

All internal strings to OMC need to be using normalized line endings (LF). The only time you "need" to change the line endings is when writing strings to a file (so writeFile taking an enumeration for text conversion, or doing this conversion in OMEdit).

in reply to:  1 comment:2 by Adrian Pop, 9 years ago

Replying to sjoelund.se:

All internal strings to OMC need to be using normalized line endings (LF). The only time you "need" to change the line endings is when writing strings to a file (so writeFile taking an enumeration for text conversion, or doing this conversion in OMEdit).

Yes, this is what I meant, that we don't have too much to change, just the unparsing (writing) to file.

comment:3 by Martin Sjölund, 9 years ago

Well, the unparsing you should not change, because it is used internally. Only the writing to files could change. OMEdit does not use the API at all, and uses its own routines for saving using QTextStream. I assume it can be changed to output the desired encoding (and if really necessary, adding a BOM at the top of files if one existed before).

comment:4 by Adeel Asghar, 9 years ago

Resolution: fixed
Status: newclosed

Added line ending settings in fbf65b8/OMEdit.

comment:5 by Christoph <buchner@…>, 9 years ago

Thank you for fixing this!

comment:6 by Adeel Asghar, 9 years ago

Milestone: Future1.10.0

comment:7 by Martin Sjölund, 7 years ago

Milestone: 1.10.0

Milestone deleted

Note: See TracTickets for help on using tickets.