Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #19838
    Yutaka Emura
    Keymaster

    Today, we are releasing EmEditor v14.9.0 beta 1.

    Updates from v14.8.1 include:

    New General Features

    • The new Match Embedded Newlines in CSV check box was added to the Find and Replace dialog boxes, which allows you to find, replace, and remove newlines.
    • The Remove Embedded Newlines in CSV command was added.

    To Download

    http://www.emurasoft.com/pub/beta/emed64_14.8.901.exe (64-bit installer)
    http://www.emurasoft.com/pub/beta/emed32_14.8.901.exe (32-bit installer)
    http://www.emurasoft.com/pub/beta/emed64_14.8.901_portable.zip (64-bit portable)
    http://www.emurasoft.com/pub/beta/emed32_14.8.901_portable.zip (32-bit portable)

    These files will be deleted when official release versions become available. The official releases can be downloaded at the Download page.

    Thank you for continue using EmEditor!

    #19840
    Stefan
    Participant

    First: what are “Embedded Newlines in CSV”?

    I found some answer there:

    http://en.wikipedia.org/wiki/Comma-separated_values
    (Fields with embedded line breaks must be quoted)

    and there:
    http://stackoverflow.com/questions/14396605/read-csv-file-with-embedded-newlines

    “2030”;”NH Amersfoort”;”Stationsstraat 75″;”3811 MH AMERSFOORT”;”www.some-hotels.tld”;”Info line 1
    Info line 2
    Info line 3
    Info line 4″

    – – –

    Now I have test this new feature:

    – Paste in the “example of the original data” from http://stackoverflow.com/questions/14396605/read-csv-file-with-embedded-newlines
    – In EmEditor use User-defined separated = ;
    – Lines are joined and the “MJ ” are there
    – Switch to “Normal Mode” >>> only the first line is restored to multi-lines.

    – – –

    Another test example:

    ID;Name Ver.;Lang
    10;”Acrobat Vollversion
    5.05″;German
    102;”Acrobat Elements
    “;German
    2380;”Active Sync
    3.7”;German

    – UDS = ;
    – Lines are joined and the “MJ ” are there
    – Switch to “Normal Mode” >>> only the first lineS are restored to multi-lines.

    – – –

    Tested with emed32_14.8.901_portable.zip – and with functions found on tool bar only.

    HTH?

    #19841
    Stefan
    Participant

    Test now “Match Embedded Newlines in CSV check box from the Find dialog box”.

    Have:
    ID;Name Ver.;Lang
    10;”Acrobat Vollversion
    5.05″;German
    102;”Acrobat Elements Version 5.05″;German
    2380;”Active Sync 3.7″;German

    Search for “version.+5”
    [x]RegEx
    [x]Match embedded newlines

    Result:
    Found only 1 match: “Acrobat Elements Version 5.05”
    Did not found “Acrobat Vollversion
    5.05”
    or
    “Acrobat VollversionMJ5.05”

    No matter if in Normal Mode or User-defined separated = ;

    Tested with emed32_14.8.901_portable.zip – and with functions from Find dialog only.

    HTH? Thanks for making EmEditor.

    —-
    Forgot: The new feature “Remove Embedded Newlines” works for me.

    .

    #19842
    Stefan
    Participant

    And thanks for EmEditor v14.6.0:

    “CSV > Fixed Width Columns” (keeps formating / the vertical alignment of columns)

    #19844
    Yutaka Emura
    Keymaster

    Hello Stefan,

    As for your first question with the CSV example from Stack Overflow. Embedded newlines mean those M and J reversed symbols (\r and \n characters) in CSV cells. These become embedded in a single line when you switch to a CSV mode, while separated into multiple lines when you switch to the Normal Mode. Does this answer your question?

    As for the second question, you should use “version(.|[\r\n])+5” for the regular expression, or check the “Regular Expressions “.” Can Match New Line Characters” check box in the Search tab of the Customize dialog box.

    Thanks,

    #19845
    Stefan
    Participant

    Hello Yutaka,
    thanks for feedback!

    1) Yes, question about “Embedded newlines” is answered.

    2)

    >> “Match Embedded Newlines in CSV” check box from the Find dialog box <<

    I think, after some more tests I understand this now:

    This option works as a limitation to match CSV line breaks (MJ) ONLY,
    and ONLY if we are in one of the CSV modes.
    It will not match ANY line break if this option is enabled for Normal mode.

    With out that option enabled, search for line breaks will match everywhere.

    (tested with above Stack Overflow example and RegEx search for “ul.+?ul”)

    So I understand it as “Match CSV Embedded Newlines only”

    Right?

    BTW:
    me think the “Match Embedded Newlines in CSV” check box
    should be located under “Customize > CSV”
    and not in the main Find dialog,
    as that is an option only a few would need in an text editor.

    3)

    >> Switching to “Normal Mode” only the first lineS are restored to multi-lines. <<

    Some more investigation to the bug mentioned in my above first post:

    After a few tests, it seams, always only the last five/ten lines
    are involved and not transfered back to multi line mode.

    If I add for an test some more “last” lines,
    the before last lines are transfered back correctly now.

    It seams your for statement if off by some indices?

    HTH?
    Thanks for making EmEditor.

    #19847
    Yutaka Emura
    Keymaster

    Hi Stefan,

    2) It is more complicated that just “only”, and I also found some bugs with the current implementations. I will look into the bugs.

    3) I am not sure if I understand the problem. Can you include a sample in this forum, or email me a sample file? I would like to reproduce the problem.

    Thanks!

    #19848
    Stefan
    Participant

    General description:
    1. Paste in a CSV file ( no matter if semicolon or tab separated)
    2. Be sure one column have quoted data with an line break.
    3. Switch to CSV mode (semicolon or tab respectively)
    4. Lines are joined and the “MJ ” are visible.
    5. Switch back to Normal mode and some of the last lines are NOT switched back to multiple lines, but still have the “MJ” visible.

     
    Details:
     

    My first test was this semicolon separated example:
    – Paste in the “example of the original data” from http://stackoverflow.com/questions/14396605/read-csv-file-with-embedded-newlines
    – In EmEditor use User-defined separated = ;
    – Lines are joined and the “MJ ” are there
    – Switch to “Normal Mode” >>> only the first line is restored to multi-lines.

    My second test was with the example from above post too:
    ID;Name Ver.;Lang
    10;”Acrobat Vollversion
    5.05″;German
     

     

    My third test was this tab separated example:
    1) paste a few lines of the “Suppliers” list from “http://www.w3schools.com/sql/trysql.asp?filename=trysql_select_join_inner&#8221;
    2) in “SupplierName” column add quotes and an line break where you want.(example below)
    3) Switch to tab CSV mode.
    4) Lines are joined and the “MJ ” are visible.
    5) Switch back to Normal mode and some of the last lines are NOT switched back to multiple lines, but still have the “MJ” visible.
    6) Add some more lines to the end and test again: now the “MJ” are transformed to line break.
    7) Manipulate fourth or sixth last line again by adding quotes and line breaks.
    8) Test again and you will see that the “MJ” are NOT transformed back to line break.
     
    This happens always with just the last few lines.
    I will create a video for better explanation…. tomorrow.
     

     
    Examples from “Suppliers” list from “http://www.w3schools.com/sql/trysql.asp?filename=trysql_select_join_inner&#8221;

    SupplierID SupplierName ContactName Address
    1 Exotic Liquid Charlotte Cooper 49 Gilbert St.
    2 New Orleans Cajun Delights Shelley Burke P.O. Box 78934
    3 Grandma Kelly’s Homestead Regina Murphy

     
    SupplierID SupplierName ContactName Address
    1 Exotic Liquid Charlotte Cooper 49 Gilbert St.
    2 “New Orleans Cajun
    Delights” Shelley Burke P.O. Box 78934
    3 “Grandma Kelly’s
    Homestead” Regina Murphy

     

    #19849
    Stefan
    Participant

    Explanation video added > http://youtu.be/Uqrs42tOnlA

    #19859
    Yutaka Emura
    Keymaster

    Hello Stefan,

    Thank you for showing the screencast. The bug was fixed on beta 2:

    https://www.emeditor.com/forums/topic/emeditor-v14-9-0-beta-2/

    Thank you!

    #19867
    Stefan
    Participant

    Tested with beta 2: solved! Good work!
     

     

    I will exchange my above linked video with a new one.

     
     

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.