Solved

Editing Tools ? VI ? Pico ? NotedPad?

Posted on 2003-11-04
6
813 Views
Last Modified: 2013-12-13
This is weird, I use Vi and Notedpad(if in windows)
I used to copy the file to my windows machine and edit it using notepad ..and upload to linux box.
I use vi .. to open it .. and it's perfecly fine , except I noticed there is
[converted] [dos] message in the bottom of the screen.

then I try to use PICO to open it , it failed to display it's just display 1 symbol
looks like "y".

I wonder why note pad in myhome is not compatible with Vi and Pico? but Note pad in my school ... is compatible
is there any different type of noted pad?

or is it a vIrus ? ...  

0
Comment
Question by:wilslm
  • 3
  • 2
6 Comments
 
LVL 5

Expert Comment

by:mtmike
ID: 9680267
Windows uses a different convention for newlines (CRNL instead of NL). There are the tools dos2unix and unix2dos to convert between dos/unix format.
0
 

Author Comment

by:wilslm
ID: 9680443
you mean ^M?
in Pico they will get rid of ^M ...
this is nothing display except a symbol look like "Ym"

for example
test ^M -> this is windows if you try to open it in VI?
right ?

.....

0
 
LVL 1

Expert Comment

by:mr_rabit
ID: 9680447
open the file with vi  and then type :


:set ff=unix

save and close the file

the file is now set to a unix file (just like every new file you make)

 so it should work in pico

this is done bij the windows editor notepad or what ever you use and vi detects this
and with this command you convert it back to the original setting

greetz mr_rabit
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:wilslm
ID: 9680527
download the file ... the open it using Vi editor ... then try use Pico ...

you will see what i mean ...

www.sulaiman.org/php/search.test

this is not emergency .. but I am just curious .. because 5 file on my project .. become like that ...

thanks dude
0
 
LVL 5

Expert Comment

by:mtmike
ID: 9680590
It looks like your file is in unicode, not ascii.
0
 
LVL 5

Accepted Solution

by:
mtmike earned 250 total points
ID: 9681726
I don't know of a tool to convert from unicode to ascii, but you can simply delete the extraneous non-ascii characters to get the file contents:

cat search.test | tr -d '\000''\200\377'

You can probably configure your notepad to save in ascii.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now