Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

E-Commerce Modules

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

£ displaying as ?


Reply

6 Posts   538 Views

Avatar
bones

27 October 2011 at 3:05am Community Member, 104 Posts

I know the whole "changing the currency type" problem crops up repeatedly throughout the forums, but I'm having a slightly different problem.

Adding the following to mysite/_config results in a question mark in a black diamond appearing throughout the site:

Currency::setCurrencySymbol('£');


Changing the '£' to '£' does fix the problem, except on the checkout page, where it appears as £ rather than the £ symbol.

I guess that the former problem is an encoding issue. How could I fix it? Thanks

Avatar
Jedateach

2 November 2011 at 4:47pm (Last edited: 2 November 2011 5:14pm), Forum Moderator, 227 Posts

I've reported the issue here:
http://code.google.com/p/silverstripe-ecommerce/issues/detail?id=185

Avatar
Nicolaas

2 November 2011 at 5:41pm Forum Moderator, 213 Posts

From memory, having had that issue a few times, I think you change the _config file encoding to UTF-8 (do that first) - ask if you don't know how to do that and then re-enter the £ sign.

I have tried this for myself and you can see the results here:
http://silverstripe-ecommerce.com/shop/product-group-Carrot/product-group-Kiwi-fruit/product-Kiwi-fruit-234/

When I first opened the _config file (on linux), I saw a funny character (unknown byte basically). Then I saved the file as UTF-8, re-opened it, copied the euro sign from a random document (as I dont know how to produce it from the keyboard) and saved the file.

That seemed to have worked.

Avatar
bones

2 November 2011 at 10:28pm Community Member, 104 Posts

Thanks, Jedateach.

Nicolaas- how do you change the encoding to UTF-8 on the _config file?
I have the following line in it, is this not it?

MySQLDatabase::set_connection_charset('utf8');

Avatar
Nicolaas

3 November 2011 at 4:11pm Forum Moderator, 213 Posts

Hi Mr Bones

Ok - the mysql thing you posted is unrelated.

What you need to do is to open your editor (I used to use scite and now I use geany) and set the encoding for the file itself.

I have included an example of how I have done this.

If your editor does not allow you to do this then just download a small editor that can - just for this purpose. Just be careful also that in "FTP-ing" your file, it does not change encoding (not sure if that can happen - but I suspect it can).

Cheers

Nicolaas

Avatar
bones

3 November 2011 at 11:06pm Community Member, 104 Posts

Excellent, thank you.

In Dreamweaver CS4, it's in Modify > Page Properties > Title/Encoding > Encoding

:)