On 14-11-09 03:00 PM, chirp_devel-request(a)intrepid.danplanet.com wrote:
> Date: Sat, 8 Nov 2014 14:15:01 -0800
> From: Tom Hayward <tom(a)tomh.us>
> Subject: Re: [chirp_devel] Files with CRLF vs. LF vs. CR?
> To: "chirp_devel(a)intrepid.danplanet.com"
> <chirp_devel(a)intrepid.danplanet.com>
> Message-ID:
> <CAFXO5Z3k49=TN0ZXqAn3fn3YiUeJkGNN0ehZCHR+uQt86Eg1HA(a)mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
...
> The stock_configs are CSV files, not Python source files. They have
> different requirements.
Agreed, I only thought to try to make all the stock_configs use a
consistent line termination. If your thoughts are that this is much too
risky, I can easily skip making this change.
You also mentioned testing below but I didn't see any tests relating to
stock_configs. Would it be worth me raising a ticket to add tests that
try to load each csv file in the stock_configs directory maybe or is
this just another example of something that doesn't need fixing?
> When Chirp reads CSV files, \n, \r, or \r\n are translated to \n. On
> write, \n is translated to the system default line separator,
> os.linesep. (This is built-in behavior for Python's CSV module, not
> something we're doing explicitly.)
Thank you for the clarification. I wasn't really concerned about the
internal or output line termination used by Chirp. I merely pointed out
that the stock_configs were produced using a variety of programs such as
LibreOffice and Excel and so on and was offering to make them look more
alike. Again, it sounds like this change to the stock_configs is not
wanted so problem solved!
> Open the CSV in Chirp, edit something, and save it. That'll tell you
> which line endings are appropriate for your system.
I seem to always get DOS-formatted files output from Chirp on my Ubuntu
system using the daily builds. I shall start watching more carefully
for this behaviour now. So far, I've only used Chirp and generated csv
files for Chirp on Linux systems.
>> Once I know for sure, I shall be raising another
>> bug/ticket/issue/whatever to give all the rest of the stock_configs
>> files the same line terminators.
>
> There's no need to change something that isn't broken. You'll have to
> convince us that there is some benefit to this change.
No convincing will be necessary. However, should I still attempt to
resolve issue #1995--without altering the line terminators--and only
reorder the entries as they aren't technically broken? If yes, I will
complete applying the patch. If not, may I simply reject issue #1995?
> People use Chirp CSV files in a lot of different editors. Chirp,
> Notepad, Excel, LibreOffice, etc., all work fine now. That's a long
> list of tests that would need to be done to accept a change.
>
> Tom KD7LXL
Hmm... I don't recall seeing a list of supported external CSV editors.
Should this be added to the wiki?
Tyler
VA3DGN