Opened 8 years ago

Closed 8 years ago

Last modified 6 years ago

#3807 closed enhancement (fixed)

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

Reported by: adrpo Owned by: adeas31
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 follow-up: Changed 8 years ago by 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).

comment:2 in reply to: ↑ 1 Changed 8 years ago by adrpo

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 Changed 8 years ago by sjoelund.se

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 Changed 8 years ago by adeas31

  • Resolution set to fixed
  • Status changed from new to closed

Added line ending settings in fbf65b8/OMEdit.

comment:5 Changed 8 years ago by Christoph <buchner@…>

Thank you for fixing this!

comment:6 Changed 8 years ago by adeas31

  • Milestone changed from Future to 1.10.0

comment:7 Changed 6 years ago by sjoelund.se

  • Milestone 1.10.0 deleted

Milestone deleted

Note: See TracTickets for help on using tickets.