LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-23-2014, 11:26 PM   #1
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Rep: Reputation: Disabled
add special character from vi


I use Redhat linux v6 , I would like to add special character ( eg. black diamond suit ) to the system by using vi , would advise how to do it ? thanks



http://www.webmonkey.com/2010/02/special_characters/
 
Old 04-24-2014, 12:40 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
See the "By character value" section in: http://vim.wikia.com/wiki/Entering_special_characters

You'll need to determine the character code first though, there should be character map application in your distro.
 
Old 04-24-2014, 01:03 AM   #3
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Original Poster
Rep: Reputation: Disabled
thanks reply ,

in the page , it side to enter CTRL-K a:

I am not understand what that mean , press what key ? thanks
 
Old 04-24-2014, 01:36 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
The Unicode for "Black Diamond Suit" is U2666. As kbp mentioned, look under the "By character value" section of the cited article, where you read:
Quote:
By hex value for BMP Unicode codepoints: ^Vunnnn (with 0000 <= nnnn <= FFFF)
First you have to go into Insert mode, then in sequence Ctrl-v, u, 2, 6, 6, 6. You will not see anything on the screen except the ^ sign, but after completing the sequence a black diamond appears. Hope this helps.
 
Old 04-24-2014, 02:13 AM   #5
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colucix View Post
The Unicode for "Black Diamond Suit" is U2666. As kbp mentioned, look under the "By character value" section of the cited article, where you read:

First you have to go into Insert mode, then in sequence Ctrl-v, u, 2, 6, 6, 6. You will not see anything on the screen except the ^ sign, but after completing the sequence a black diamond appears. Hope this helps.

thanks reply ,

I follow the instruction , in Insert mode , press Ctrl-v , then u , 2 , 6 ,6 , 6 , I see a ? sign , save it and then still see the ? sign only , my procedure is incorrect ? thanks
 
Old 04-24-2014, 04:43 AM   #6
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Maybe your terminal doesn't support UNICODE character set. Which terminal are you using? If gnome-terminal (the default in Red Hat with GNOME desktop) check under the menu Terminal --> Set Character Encoding and see if Unicode (UTF-8) is there and selected.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
block special and character special files s_shenbaga Linux - Newbie 4 06-23-2015 02:16 AM
Find and Replace character/special character from the file MyRelam Red Hat 8 05-21-2012 12:52 AM
special character boolim Linux - General 1 08-29-2003 09:57 AM
i need help with a special character Hone101 Linux - Newbie 1 05-03-2003 07:21 PM


All times are GMT -5. The time now is 12:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration