Unix administration - Inserting a CENT current symbol in a unix file

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > September 2004 > Inserting a CENT current symbol in a unix file





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Inserting a CENT current symbol in a unix file
Eldho Thomas

2004-09-10, 5:54 pm

How can I insert a CENT currency symbol in a unix file using "vi" ? Can
someone help me ?

Thanks.


Eldho Thomas

2004-09-10, 5:54 pm

Sorry ! I meant CENT "currency" symbol (in the subject)

"Eldho Thomas" <ReplyToGrp@Nowhere.com> wrote in message news:...
> How can I insert a CENT currency symbol in a unix file using "vi" ? Can
> someone help me ?
>
> Thanks.
>
>



Kieran Simkin

2004-09-10, 5:54 pm

"Eldho Thomas" <ReplyToGrp@Nowhere.com> wrote in message
news:J0o0d.18542$0A6.10236@newssvr22.news.prodigy.com...[vbcol=seagreen]
> Sorry ! I meant CENT "currency" symbol (in the subject)
>
> "Eldho Thomas" <ReplyToGrp@Nowhere.com> wrote in message news:...

There is no cent symbol in standard ASCII. Best not use it.


Andrew

2004-09-10, 5:54 pm

Eldho Thomas wrote:

> How can I insert a CENT currency symbol in a unix file using "vi" ? Can
> someone help me ?


There may be a better way to do this, but here's a method that works.

$ echo "\0242" >/tmp/foo

Then use <esc>:r/tmp/foo to read the file (symbol) into the working text.

There is probably some key sequence to insert the symbol directly, but I
don't know it. Note that vi shows the escaped character sequence rather
than the symbol itself. But, it's there.

andrew@lod.com
Pascal Bourguignon

2004-09-10, 8:48 pm


"Eldho Thomas" <ReplyToGrp@Nowhere.com> writes:
> How can I insert a CENT currency symbol in a unix file using "vi" ? Can
> someone help me ?


Your question is meaningless. You have to specify the character set
and the file encoding you want!


(Here, with my emacs I just type: C-x 8 c --> ¢ which gives be the
cent symbol, IN THE EMACS BUFFER! It's far from being written into a
unix file. Since I configured my emacs to use the iso-8859-15
character set in plain binary with unix line terminator encoding to
write my files, when saving it I get a file of iso-8859-15 bytes. But
if I had specified UTF-8, or UTF-16, I would get quite a different file!)

--
__Pascal Bourguignon__ http://www.informatimago.com/

Our enemies are innovative and resourceful, and so are we. They never
stop thinking about new ways to harm our country and our people, and
neither do we.
Roger Leigh

2004-09-11, 7:49 am

"Kieran Simkin" <kieran@digital-crocus.com> writes:

> "Eldho Thomas" <ReplyToGrp@Nowhere.com> wrote in message
> news:J0o0d.18542$0A6.10236@newssvr22.news.prodigy.com...
>
> There is no cent symbol in standard ASCII. Best not use it.


Huh? On a modern system with UTF-8 locales, is there any good reason
to still restrict ourselves to US-ASCII? Or even ISO-8859?

For the OP: In a vi(m) buffer, I typed "Shift-AltGR c |", and got a
`¢' symbol. This also works in Emacs, with a terminal etc. The
keystrokes may differ depending on your setup, but you can always use
the UCS codepoint number.


--
Roger Leigh

Printing on GNU/Linux? http://gimp-print.sourceforge.net/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com