#390 cannot edit .csv files

closed-fixed
None
5
2006-08-12
2004-08-04
leissner
No

With Nedit 5.3, <lf> and <cr><lf> are converted into
the same internal representation.
This 'feature' cannot be switched off.
In .csv files from MS exxel, <lf> is used as newline within
a cell, <cr><lf> serves as a dataset separator. These
cannot be distinguished after edit using Nedit 5.3.
Using Nedit 5.0.2 is ok.

Discussion

  • Tony Balinski

    Tony Balinski - 2004-08-04

    Logged In: YES
    user_id=618141

    This is actually a very good point. Since we've had the
    DOS/Mac/Unix line-end detection, we have lost the ability to
    access the raw textual representation of a file. Mostly,
    this is what we "want" NEdit to do (a DOS file stays DOS, etc).

    However, it would be useful to allow this feature to be
    turned off: I would certainly do so, since I never want to
    save files in DOS format, even if they were created with
    Windows. I could see when Windows line-ends were being used
    (little <cr>s at the end of lines) and act accordingly.

    Such a "detect different line-ending types" preference, if
    turned off, should affect the asking for line-end types in
    the Save As dialog. Ideally it would be nice to be able to
    say, display as DOS (in which case we should see little
    <lf>s without linebreaks when they appear without <cr>s, and
    vice-versa). That might be tricky to implement however.
    Otherwise, the old 5.0.2 behaviour, assuming line-ends are
    marked by newlines only, is the way to go.

    Tony

     
  • Nathan Gray

    Nathan Gray - 2004-08-04

    Logged In: YES
    user_id=121553

    We can talk about it after 5.5 is released.

     
  • Thorsten Haude

    Thorsten Haude - 2004-08-06

    Logged In: YES
    user_id=119143

    >We can talk about it after 5.5 is released.

    Please let us know when we are allowed to discuss this again.

     
  • Thorsten Haude

    Thorsten Haude - 2006-04-01
    • assigned_to: nobody --> yooden
     
  • Thorsten Haude

    Thorsten Haude - 2006-04-01

    Logged In: YES
    user_id=119143

    I added a resource 'forceOSConversion' to control this
    behavior. Please have a look at the attached patch.

     
  • Thorsten Haude

    Thorsten Haude - 2006-04-02

    Logged In: YES
    user_id=119143

    Leissner, could you attach an example file?

     
  • Thorsten Haude

    Thorsten Haude - 2006-04-16

    Logged In: YES
    user_id=119143

    New version of the fix, less stupid settings handling.

     
  • leissner

    leissner - 2006-04-18

    Logged In: YES
    user_id=1097417

    Hello yooden,

    I've attached an example file 'abc'.

    Have a look at it using 'tr' to visualize the <CR>:
    > tr "\r" '@' <abc
    0 abc abc abc eol:@
    1 abc abc abc eol:@
    2 abc abc abc eol:@
    3 abc abc abc eol:@
    4 abc abc abc eol:@
    5 abc abc abc eol:@
    6 abc
    abc
    abc
    eol:@
    7 abc
    abc
    abc
    eol:@
    8 abc
    abc
    abc
    eol:@

    and after saving it from nedit 5.5:
    > tr "\r" '@' <abc.after
    0 abc abc abc eol:@
    1 abc abc abc eol:@
    2 abc abc abc eol:@
    3 abc abc abc eol:@
    4 abc abc abc eol:@
    5 abc abc abc eol:@
    6 abc@
    abc@
    abc@
    eol:@
    7 abc@
    abc@
    abc@
    eol:@
    8 abc@
    abc@
    abc@
    eol:@

    Manfred

     
  • leissner

    leissner - 2006-04-18

    file before editing with nedit

     
  • Thorsten Haude

    Thorsten Haude - 2006-04-18
    • status: open --> open-fixed
     
  • Thorsten Haude

    Thorsten Haude - 2006-04-18

    Logged In: YES
    user_id=119143

    Looks like the patch works ok. Have a look at the attached
    screen shot; is that what you would expect?

    Better yet, could you apply the patch, build NEdit and play
    around with is a bit?

    Anyway, I will assume that solves the problem.

     
  • Thorsten Haude

    Thorsten Haude - 2006-04-25

    Logged In: YES
    user_id=119143

    I moved the small compiler warning changes to another patch.

     
  • Thorsten Haude

    Thorsten Haude - 2006-08-12
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks