Jump to content
ChrisColeman

Currency Symbols Incorrect ...

Recommended Posts

Hi,

      Just upgrading n old V4 to 6.2.2.

I have a problem with currency codes USD shows fine, but UKP and Euro puts a ? where the currency symbol ought to be (image attached).

I an testing this with 'default foundation skin' so its not likely to my skin that's causing the problem.

Any ideas ..

Many Thanks, Chris Coleman.

 

 

Capture.PNG

Share this post


Link to post
Share on other sites

This sometimes happens when the encoding changes. If you manually edit then in the currencies section they'll be fine.

Share this post


Link to post
Share on other sites

CC3/4 used characters from the actual encodings for that language -- but as an option, used the html entities (£, €).

CC5/6 uses UTF-8, which, if the database contents were not properly converted, will not show the characters correctly.

In admin, Currencies, note the currencies you have enabled.

Visit a Latin-to-UTF8 converter site (example: https://www.charset.org/utf8-to-latin-converter).

Replace the currency symbol(s) with what is given to you from the converter.

Share this post


Link to post
Share on other sites
Posted (edited)

Hi,

Seems that the DataBase encoding is fine ..

Smarty Debug shows that the '£' character is being passed correctly  -

 product_id => "11763"
  product_code => "TLS130"
  quantity => "1"
  description => "<p>1/12th scale Quality porcelain man beautifully hand dressed in the Tudor S..."
  description_short => "1/12th scale Quality porcelain man beautifully hand dressed in the Tudor Styl..."
  price => "£99.00"
  name => "Tudor man"

Also the following is set -

                                  <meta charset="utf-8">

 

But when I use $product.price in my HTML I still get a strange character ..

Any ideas, probably something silly ?

Thanks Chris.

Edited by ChrisColeman
Corrected Problem Description ..

Share this post


Link to post
Share on other sites

Yes it was - silly - on my own caching system I automatically clear the cache when caching is inactive.

But I don't really know the cause - I restarted coding the skin but the problem remained - Then I cleared the cache 😵

Thanks Anyway ..

Edited by ChrisColeman

Share this post


Link to post
Share on other sites

Yes another update ..

Finally I have some more info. on this, in the debug environment the problem does not occur ...

If I run with 'Store Debug On' then the problem does not occur (caching makes no difference), I soon as turn debug off the problem re-appears.  Anyway I'm not too concerned because this only happens on my local test server. In the production environment its 'working as designed'.

I just wondered do one of you experts have any ideas why this could happen.

Many Thanks.

Edited by ChrisColeman

Share this post


Link to post
Share on other sites

Smarty debug? Or just general debugging enabled in admin, Store Settings, Advanced tab?

If general debugging, then the new squeezing and minifying of rendered template content is not performed.

So, I wonder if some part of the squeezer is not utf-8 aware. A few weeks ago, I posted an issue at the Github repository for this module (based on someone else having a similar problem):
https://github.com/markhughes/HTMLMinify-Smarty/issues

 

Edited by bsmither

Share this post


Link to post
Share on other sites

Yes that looks about correct.

 

And yes my above comment should be about general debug and not smarty debug (now corrected).

 

I'll track the issue.

 

Thank You..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×