473,325 Members | 2,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Latin Capital A with circumflex preceding a pound symbol.


Hi,

Sorry if this has been asked before, and apologise if this is the
wrong NG.

I am using PHP 5.0.5 and Apache 2.0.54 in a Win2k environment.

Lately I have been playng with RSS feeds. I managed to get "lastRSS"
which is a simple RSS parser.

When I tried to setup an RSS feed to eBay to get custom searches
straight to my desktop I noticed that the UK Pound sterling symbol is
shown preceded by a Latin capital A with circumflex. (An 'A' wearning
a hat).

I checked the RSS feed and the extra char is not there.

So, I am unsure how to progress to sort this out. I don't know if PHP
or apache is the problem. I can only find one other comment on Google
where someone is having the same problem. But still no answer.

I checked the changelogs for the lastest versions of PHP and Apache
and there is no mention of this bug.

Is it just me?
Any clues will be much appreciated.

Kind regards

Nick Thomas
Feb 2 '06 #1
2 6647
On Thu, 02 Feb 2006 21:35:22 GMT, ju**@junk.com wrote:
Sorry if this has been asked before, and apologise if this is the
wrong NG.

I am using PHP 5.0.5 and Apache 2.0.54 in a Win2k environment.

Lately I have been playng with RSS feeds. I managed to get "lastRSS"
which is a simple RSS parser.

When I tried to setup an RSS feed to eBay to get custom searches
straight to my desktop I noticed that the UK Pound sterling symbol is
shown preceded by a Latin capital A with circumflex. (An 'A' wearning
a hat).

I checked the RSS feed and the extra char is not there.

So, I am unsure how to progress to sort this out. I don't know if PHP
or apache is the problem. I can only find one other comment on Google
where someone is having the same problem. But still no answer.

I checked the changelogs for the lastest versions of PHP and Apache
and there is no mention of this bug.

Is it just me?

Any clues will be much appreciated.


First thing to consider is the encoding - what encoding is the RSS feed in? As
it's XML, the most common encoding is UTF-8.

What did you check the RSS feed with? If you used a browser or a half decent
editor it would most likely have understood the encoding and presented the
character correctly.

But your PHP code may be trying to treat UTF-8 as single-byte ISO-8859-1.

A British pound symbol is two bytes in UTF-8 - it's U+00A3 which is 0xC2 0xA3
in UTF-8.

http://www.fileformat.info/info/unic...00A3/index.htm

If you tried to display this as ISO-8859-1 you'd get:

0xC2 = Latin capital A with circumflex
0xA3 = British pound symbol

http://en.wikipedia.org/wiki/ISO_8859-1
--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Feb 2 '06 #2
On Thu, 02 Feb 2006 22:00:17 +0000, Andy Hassall <an**@andyh.co.uk>
wrote:
On Thu, 02 Feb 2006 21:35:22 GMT, ju**@junk.com wrote:
Sorry if this has been asked before, and apologise if this is the
wrong NG.

I am using PHP 5.0.5 and Apache 2.0.54 in a Win2k environment.

Lately I have been playng with RSS feeds. I managed to get "lastRSS"
which is a simple RSS parser.

When I tried to setup an RSS feed to eBay to get custom searches
straight to my desktop I noticed that the UK Pound sterling symbol is
shown preceded by a Latin capital A with circumflex. (An 'A' wearning
a hat).

I checked the RSS feed and the extra char is not there.

So, I am unsure how to progress to sort this out. I don't know if PHP
or apache is the problem. I can only find one other comment on Google
where someone is having the same problem. But still no answer.

I checked the changelogs for the lastest versions of PHP and Apache
and there is no mention of this bug.

Is it just me?

Any clues will be much appreciated.


First thing to consider is the encoding - what encoding is the RSS feed in? As
it's XML, the most common encoding is UTF-8.

What did you check the RSS feed with? If you used a browser or a half decent
editor it would most likely have understood the encoding and presented the
character correctly.

But your PHP code may be trying to treat UTF-8 as single-byte ISO-8859-1.

A British pound symbol is two bytes in UTF-8 - it's U+00A3 which is 0xC2 0xA3
in UTF-8.

http://www.fileformat.info/info/unic...00A3/index.htm

If you tried to display this as ISO-8859-1 you'd get:

0xC2 = Latin capital A with circumflex
0xA3 = British pound symbol

http://en.wikipedia.org/wiki/ISO_8859-1

Ahh. I realize that my knowledge in this area is somewhat lacking.
After some more digging (and googling) I now come to the unfortunate
realisation that I made a mistake.

To fix my problem I simply needed to add :
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
to the <head> section of my HTML page.

I now understand that this is not a PHP problem at all, and I
apologise for suggesting such.

Thanks to Andy for pointing me in the right direction.

Regards
Nick
Feb 4 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Vic Russell | last post by:
Hi, I'm trying to get the British pound (£) symbol through LibXML and just get "£" instead. Any ideas? Vic
30
by: Mark Tranchant | last post by:
Take a look at this page: http://tranchant.plus.com/cycling/gears/ratio Just over half-way down is the sentence 'My wheels are approximately 27? in diameter'. I use the ″ double prime for...
3
by: Paul Hadfield | last post by:
All, When I use system.IO.StreamWriter to write append a string to file that contains the GBP pound symbol, I notice that it also appends an extra character before the pond symbol. Yet when I...
10
by: Mike9900 | last post by:
Hello, I need a regular expression to match a currency with its symbol, for example Pound66.99 must return 66.99 or Pound(66.99) or Pound-66.99 or -66.99Pound return -66.99 or any other...
1
by: Lurker | last post by:
I want send latin-1 string to web server by url parameter urllib.quote return just symbol code with preceeding percent for every non-ascii character: #>ustr = 'Ü' #>urllib.quote(ustr) '%9A' ...
1
by: teesea77 | last post by:
Hi I'm having a bit of difficulty with some text encoding, the problem is that i have set up all posts so that "ISO-8859-1" is used so that when a user adds the pound symbol "£" in a text area...
2
by: Seguros Catatumbo | last post by:
Hi, i am trying to fill a dropdown menu with ajax, but the table contains latin characters. In mozilla i get a weird black character instead, and in internet explorer the whole code breaks because...
12
by: adamurbas | last post by:
ya so im pretty much a newb to this whole python thing... its pretty cool but i just started today and im already having trouble. i started to use a tutorial that i found somewhere and i followed...
5
by: ramaswamynanda | last post by:
Hello, I have a currency field on my form. The default formats for this field are dollar, euro. There is no pound symbol.....How do i put in a currency format, having the pound sign. Any help...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.