English Amiga Board


Go Back   English Amiga Board > Support > support.Apps

 
 
Thread Tools
Old 28 February 2013, 05:55   #1
source
Zone Friend
 
Join Date: Jul 2005
Location: Toronto, Canada
Posts: 708
removing extra characters from windows text files

I was wondering if there was a little program that would convert windows text files to amiga. The windows text files when loaded into ced has extra line feeds and a rectangular character at the end of the text line. Is there anything out there that would remove them, or is there something I should be doing on the windows side to remove the characters.
Thanks
source is offline  
Old 28 February 2013, 06:57   #2
mailman
Zone Friend

mailman's Avatar
 
Join Date: Jun 2005
Location: Warsaw/Poland
Age: 42
Posts: 2,344
I always remove this extra character using REPLACE function. I just copy the character from the end of the line and paste it into the REPLACE window. The character and extra line feed should disappear.
mailman is offline  
Old 28 February 2013, 07:37   #3
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,851
http://aminet.net/search?query=textconv
PeterK is offline  
Old 28 February 2013, 11:27   #4
hooverphonique
ex. demoscener "Bigmama"

 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,217
yes, as mailman says, you can remove them using ced's replace operation.
hooverphonique is offline  
Old 28 February 2013, 12:20   #5
thomas
Registered User
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,184
Quote:
Originally Posted by source View Post
I was wondering if there was a little program that would convert windows text files to amiga. The windows text files when loaded into ced has extra line feeds and a rectangular character at the end of the text line. Is there anything out there that would remove them, or is there something I should be doing on the windows side to remove the characters.
Thanks
in CED press Amiga-R, enter Ctrl-M into the upper text field and leave the lower text field empty, then replace everything in turbo mode.

If Ctrl-M does not give a character, run Prefs/IControl and disable Text Gadget Filter.

In CED V5 you can select File -> End-of-line Translation from the menu.
thomas is offline  
Old 28 February 2013, 13:26   #6
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,265
Quote:
Originally Posted by source View Post
or is there something I should be doing on the windows side to remove the characters.
Thanks
If you're working the files on Windows to begin with, use a decent text editor which allows you to select or convert to LF line endings, instead of LF+CR which is the Microsoft way of doing things.

Notepad++, Programmer's Notepad, Ultraedit and Sublime Text are some good editors that should be able to do this.
Leffmann is offline  
Old 28 February 2013, 15:43   #7
Akira
Black Lives Matter

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 19,475
I use Notepad++ on my PC and it can remove all that garbage. Just set it to show LFs and replace them with emptiness. Works great.

It's a fantastic free program everyone should have.
Akira is offline  
Old 28 February 2013, 16:17   #8
TCD
Registered User

TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 42
Posts: 24,024
Quote:
Originally Posted by Akira View Post
Just set it to show LFs and replace them with emptiness.
Even simpler: Choose 'Edit -> EOL Conversion -> UNIX/OSX Format'
TCD is offline  
Old 08 March 2013, 02:43   #9
source
Zone Friend
 
Join Date: Jul 2005
Location: Toronto, Canada
Posts: 708
Thanks for all the replies. This has always been a pain for me. I am going to see if I can get the Ced trick to work. I have version 5 installed.
Thanks again. This site is great for the amiga community.
source is offline  
Old 08 March 2013, 11:29   #10
Akira
Black Lives Matter

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 19,475
Quote:
Originally Posted by TheCyberDruid View Post
Even simpler: Choose 'Edit -> EOL Conversion -> UNIX/OSX Format'
Nice one! I didn't know that trick
I love Notepad++
Akira is offline  
Old 26 October 2014, 02:38   #11
Thorham
Computer Nerd

Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 44
Posts: 3,202
There's a MUCH better way: Make a macro. You can save macros and they'll be loaded automatically when you start Ced. Do this once, and never be bothered by this problem again!

First load a text so that you can see that it works. Then do:

1) right amiga+m (starts macro input)
2) press the key you want to assign the macro to, I use F10 for this macro.
3) ctrl+up (moves to start of file)
4) right amiga+b (block mark mode)
5) ctrl+down (move to end of file)
6) enter menu -> Cut/Paste -> Strip CR marked
7) ctrl+up
8) right amiga m (ends macro input)
9) Save the macro: Enter menu -> Global -> Macro definitions -> Save definitions. Use the default name (cedmacros).

That's it. Now whenever you load a windows ascii text, just press F10 (or whatever you picked), and the text will be converted to Amiga format.

Edit:

Hmm, this is an old thread... Thought it was a new post
Thorham is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows text to AmigaBasic ? Angelsoft New to Emulation or Amiga scene 9 24 October 2011 22:31
Bug: Filenames containing national characters in Windows Directories arnljot support.WinUAE 17 17 December 2009 13:19
Completely Removing IDE-FIX Express Files illy5603 support.Hardware 2 15 August 2009 03:11
Removing write protection from files NovaCoder New to Emulation or Amiga scene 1 29 November 2008 05:37
NOTE: You can't use DMS files with names longer than 18 characters! andreas support.WinUAE 2 07 July 2002 03:22

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 15:31.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.13492 seconds with 13 queries