Solved

Editing Tools ? VI ? Pico ? NotedPad?

Posted on 2003-11-04
6
822 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

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…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

813 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