Solved

Editing Tools ? VI ? Pico ? NotedPad?

Posted on 2003-11-04
6
818 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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.:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

929 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

11 Experts available now in Live!

Get 1:1 Help Now