Re: utf8 encoding £ to £ problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Chris Dean wrote:
> Just the £ and in my case I need to use that symbol, can't really get round it sensibly with £ 

I think Jochen is right about the double encoding.

The question I have to ask is where does your £ sign come from?

I can think of 3 places:

1) in the text.
2) from a DB.
3) from user input (e.g. via form).

If 1), then you can save your files as UTF8 encoded, and therefore you
just use a £ sign as normal and echo it to the user as normal, and it
will stay utf8 all the way (I presume you have utf8 charset configured
in your HTML output?)

If 2), again this can be stored either in a UTF8 charset table or in a
latin1 table and it shoudln't really matter provided your connection
charset is correct. Just use it as is.

If 3), if you pages are UTF8 encoded, the browsers /should/ (and in my
experience generally do), submit forms in utf8 encoding. Again I just
use it and don't have many problems.

So I guess the question I'm asking is why are you passing the £ symbol
through UTF8 encoding functions at all?

Col.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux