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   558 Views

Avatar
bones

Community Member, 104 Posts

27 October 2011 at 3:05am

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

Forum Moderator, 232 Posts

2 November 2011 at 4:47pm

Edited: 02/11/2011 5:14pm

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

Avatar
Nicolaas

Forum Moderator, 213 Posts

2 November 2011 at 5:41pm

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

Community Member, 104 Posts

2 November 2011 at 10:28pm

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

Forum Moderator, 213 Posts

3 November 2011 at 4:11pm

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

Community Member, 104 Posts

3 November 2011 at 11:06pm

Excellent, thank you.

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

:)