Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Other Versions > EOL (End Of Life) Versions
FedoraForum Search

Forgot Password? Join Us!

EOL (End Of Life) Versions This is a Forum to discuss problems and workarounds for versions of Fedora that have passed End of Life.

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1  
Old 23rd March 2006, 03:30 PM
Kilo's Avatar
Kilo Offline
Registered User
 
Join Date: Mar 2004
Location: Surrey / London, England
Age: 33
Posts: 67
Pound Symbols Displaying Incorrectly

Hi all,

I've searched for this and come up with no real results - maybe this board's US members have never come across this, I don't know...

Anyway, I've got a couple of fedora boxes, one running Core 3, another Core 4. On both boxes, if I 'vi' a file and attempt to insert a pound symbol (£), that single keystroke renders £

This is causing me a fair amount of pain because while MySQL stores it okay from web form submissions, and MySQL monitor renders it okay, if a user enters say £100 into a web form, then I try and load that data back into a web form, it appears as £100.


str_replace() can't be used to catch either 'Â' or '£' - any ideas?

I notice this board handles it okay - what am I doing wrong?

Thanks in advance.


Neil.
  #2  
Old 23rd March 2006, 05:54 PM
drunkahol Offline
Registered User
 
Join Date: Jun 2004
Location: Norwich
Posts: 638
I've just done a vi test for you and got a single pound sign whenever I hit the pound key.

Try creating a blank file, vi'ing it and sticking a SINGLE pound sign in. Save the file and then do `wc` on the file. Is it two characters or just a single character in size? The do an ls -la on the file to see how many bytes it takes up.

Might have something to do with Unicode, but I'm not certain.

Cheers

Duncan
__________________
Supermicro X5DA8 2x Xeon 2.8GHz 6Gb RAM: Fedora 15
Thinkpad T40p: Fedora 16
HP Pavilion dv9000: Fedora 14
Advent 4211: Fedora 16
  #3  
Old 23rd March 2006, 06:01 PM
Kilo's Avatar
Kilo Offline
Registered User
 
Join Date: Mar 2004
Location: Surrey / London, England
Age: 33
Posts: 67
Quote:
Originally Posted by drunkahol
Try creating a blank file, vi'ing it and sticking a SINGLE pound sign in. Save the file and then do `wc` on the file. Is it two characters or just a single character in size? The do an ls -la on the file to see how many bytes it takes up.
Done - 3 bytes. Eh?!!
  #4  
Old 3rd April 2006, 04:07 PM
Kilo's Avatar
Kilo Offline
Registered User
 
Join Date: Mar 2004
Location: Surrey / London, England
Age: 33
Posts: 67
Hello,

Right. p.txt is a text file containing only £ (no white space) which shows as £

The command wc p.txt yields

1 1 3 p.txt


Any ideas?! I guess I've got the charset wrong somewhere. Where do I go to adjust this (command line only)?
  #5  
Old 3rd April 2006, 06:50 PM
drunkahol Offline
Registered User
 
Join Date: Jun 2004
Location: Norwich
Posts: 638
Try

Code:
system-config-keyboard --text
or the other "system-config-" commands in /usr/bin.

I've just grepped through /etc/ for anything with "gb" in it, but nearly everything has a "gb" in it somehow!

For the record, my single character vi file returns the following from wc:

Code:
[root@thinkpad ~]# vi test
[root@thinkpad ~]# cat test
£
[root@thinkpad ~]# wc test
1 1 3 test
[root@thinkpad ~]# ls -laFs test
4 -rw-r--r-- 1 root root 3 Apr  3 18:49 test
[root@thinkpad ~]#
I think I've run out of suggestions - sorry

Duncan
__________________
Supermicro X5DA8 2x Xeon 2.8GHz 6Gb RAM: Fedora 15
Thinkpad T40p: Fedora 16
HP Pavilion dv9000: Fedora 14
Advent 4211: Fedora 16
  #6  
Old 4th April 2006, 10:23 AM
Kilo's Avatar
Kilo Offline
Registered User
 
Join Date: Mar 2004
Location: Surrey / London, England
Age: 33
Posts: 67
Thanks. Both my ls -laFs and my wc results are the same.

When I type a pound sign at the command prompt it comes out fine (£), it's just in vi it appears as £.
  #7  
Old 4th April 2006, 03:33 PM
drunkahol Offline
Registered User
 
Join Date: Jun 2004
Location: Norwich
Posts: 638
Try

Code:
set
at the command prompt. It will list all your session parameters. Check for LANG and TERM. If they are different from what you expect, that would be a place to start.

Not sure if vi has a configuration file. Perhaps it's setting a session parameter incorrectly?

Duncan
__________________
Supermicro X5DA8 2x Xeon 2.8GHz 6Gb RAM: Fedora 15
Thinkpad T40p: Fedora 16
HP Pavilion dv9000: Fedora 14
Advent 4211: Fedora 16
  #8  
Old 4th April 2006, 03:41 PM
daverj Offline
Registered User
 
Join Date: Jan 2006
Location: Denver, CO USA
Posts: 670
Try this:

echo '£' > /tmp/filename

cat /tmp/filename and see if it is correct. Then vi it and see what it looks like. Your default vimrc file might be set to unicode. check /etc/vimrc. That's where the default file is (unless you have a .vimrc file in your home directory).

Dave
  #9  
Old 10th April 2013, 04:31 PM
tobyv Offline
Registered User
 
Join Date: Apr 2013
Location: London
Posts: 1
windows_7firefox
Re: Pound Symbols Displaying Incorrectly

I know this is a very old thread but I still haven't seen a good answer to this on Google.

I managed fix this same problem by setting the LC_CTYPE variable as follows:

export LC_CTYPE=en_GB.ISO8859-15

This was previously set to en_US.UTF-8
  #10  
Old 10th April 2013, 05:37 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,711
linuxfirefox
Re: Pound Symbols Displaying Incorrectly

tobyv, if you are still having locale problems on a modern Fedora, please start a new thread. Mention the actual Fedora version that you are using, along with what software or desktop exhibits the problem.

Although the underlying locale mechanism (environment variables) hasn’t changed since ancient times, the common methods of choosing a system/user locale have moved on since FC2/4. At the very least, you want en_GB.UTF-8, not the old Latin9 encoding.

Thread closed and moved to EOF.
Closed Thread

Tags
displaying, incorrectly, pound, symbols

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get the Pound sign? Jongi Using Fedora 20 27th March 2008 10:33 PM
hostname incorrectly displayed seby Servers & Networking 3 4th January 2008 09:33 AM
Forklift removes 900-pound man from home Seve Wibble 16 27th September 2007 09:02 AM


Current GMT-time: 04:07 (Saturday, 25-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat