Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Currency question mark


iLoco

Recommended Posts

Hi there,

I have recently moved a site to a local LAMP so i can do work on it.

Though i have a problem.

 

When i got onto the administration page the currency on the site is coming up with a �.

On the main site the currency looks fine.

  • I am trying to set it up as GBP.
  • I have checked the localization settings and the left symbol is set to £.
  • I have googled it and saw similar people with encoding problems.
  • I have removed the database and imported it again with ISO-8859-1 and made sure the database collation is latin1_swedish_ci
  • i have added AddDefaultCharset ISO-8859-1 to the .htaccess file.

I am slowly running out of ideas.

 

Can any help?

Link to comment
Share on other sites

That did not work as I hoped. The currency symbols show instead of the html coding that I used. Do a search for html characters and insert those rather than the actual pound sign and that should work.

However, I believe that you would be best to convert everything to utf-8 encoding if you can, as this is universal.

Find codes here: http://webdesign.about.com/od/localization/l/blhtmlcodes-cur.htm

Link to comment
Share on other sites

Hi there, thanks for the reply but i have already tried the & # 1 6 3 code but that does not work.

I tried entering it straight into the database in the orders_total table and i have tried editing the localization settings.

 

Like i said it displays fine on the actual site. This problem is only when i view it from the /catalog/admin panel and invoices.

 

Wouldn't converting the whole site to utf-8 be a bit of a mission?

Link to comment
Share on other sites

Are the catalog and admin pages displaying with a different character set encoding for some reason? Say, one Latin-1/ISO-8859-1 and the other UTF-8? You say that you use an HTML entity ( 163; ) and it fails? Keep in mind that 163 is the Latin-1 code point, and should be valid for UTF-8 pages if given as a numeric HTML entity. It won't work if it's a hard coded (binary) single byte character. Have you tried & pound; for the Pound Sterling? Either form of HTML entity (numeric or named) should work across all code pages (character encodings). Have you told your browser (View > Encoding, or similar) to try other encodings and see if the character appears correctly elsewhere (and more importantly, what is your page actually displaying in)? I've heard of servers that override whatever page encoding you specify and force Latin-1, but if you're seeing a ?-in-diamond, that means you've got UTF-8 trying to display a Latin-1 hard coded (binary 163) character.

Link to comment
Share on other sites

did you compare the upper part of the two english.php files, catalog and admin? where the charsets are defined?

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

How do i make this persistent so if does not happen again?

Or am i going to have to edit the database every time i add a product?

When you define your currency/currencies, they're stored in the database and you should not have to re-enter it for each product. It uses that information every time it's called upon to display a price in the given currency. If you are manually entering prices (in Pounds) for each product, in the copy text, then yes, you will have to use & pound; each time.

Link to comment
Share on other sites

use an ASCII code:

 

€ - euro sign is entered as: chr(128)

 

i dont suffer from this issue as my DB is setup ato use latin1_swedish_ci

 

but i did use this to force my on the fly PDF generator to show me the € sign. Give it a go! - if not just to rule it out.

Link to comment
Share on other sites

That's not ASCII. It's character 128 (x80), which is exclusive to Microsoft's Windows-1252 character set. It's not properly recognized as Latin-1, nor UTF-8, but most browsers will handle hex 8x and 9x "Latin-1" codes as Windows-1252 characters. If it works for you, great, but don't count on it to be universal, and don't count on random customers' browsers to render it correctly (unless you explicitly specify your encoding to be Windows-1252)..

Link to comment
Share on other sites

You made the statement that anyone can use character code 128 (hex 80) to display a Euro. I pointed out that code position is only a Euro on Windows-1252, but that many browsers are forgiving enough to interpret it as a Euro rather than as a control code if you claim your page is in Latin-1 (I don't know about UTF-8... I doubt it will work). If it works for you, great, but what I said is not to expect it to work universally. I have no idea what your PDF builder is trying to use for an encoding.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...