Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Editing Text file - need to replace ^M (ascii 13)

Options
  • 28-08-2003 4:37pm
    #1
    Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 91,761 Mod ✭✭✭✭


    I've a file that I need to import.

    Only problem is it uses ^K as end of line and ^M as end of record.

    It's easy enough to change the ^K to a ^J and it sorta looks ok ^M^J would be better though.

    And the editors I usually use can't tell the difference between pressing enter and ALT-13

    (Have tried Control-P followed by Control-M - this used to work )

    So any one know a good text editer that will allow replacement of any of the 256 asciii chars ?? or any other trick I can use ??

    (I've tried Excel / open office import but records get trucated at 255 bytes :( )

    (back in the 80's I'd have used sidekick but it don't run on windows and anyway the file is too big.)


Comments

  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 91,761 Mod ✭✭✭✭Capt'n Midnight




  • Registered Users Posts: 4,159 ✭✭✭Quigs Snr


    Another one you could use is VEDIT


  • Registered Users Posts: 19,608 ✭✭✭✭sceptre


    Originally posted by Capt'n Midnight
    http://www.winvi.de/en/download.html
    Ah, Vi, the programmer's torture of choice.

    I can't stand it myself but maybe the windows version doesn't cause you to tear out hair and throw things


  • Registered Users Posts: 153 ✭✭crowbar


    i swear by editplus for my windows text editing needs. best text editor ever, has almost everything i've ever wanted to do with text.


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 91,761 Mod ✭✭✭✭Capt'n Midnight


    It is basically Notepad with a few extra buttons.

    It's also GNU and comes with source code.

    it is a notepad replacement - which allows you to view, edit / replace in ASCII , EBDIC and HEX

    niggles - you can't replace until you've done a find
    and if the replacement string contains more than one copy of the search string it may go into a loop (just click cancel)


  • Advertisement
  • Registered Users Posts: 6,265 ✭✭✭MiCr0


    to remove this in unix anyway..............

    vi file_name.blah

    Press escape
    Then
    :
    %
    s
    /
    ctrl-v ctrl-m (which will produce ^M)
    //
    g

    The line should look like
    :%s/^M//g

    and press enter


Advertisement