Jump to:

2081 Posts in 1001 Topics by 452 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » £ displaying as ?

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

Page: 1
Go to End
Author Topic: 508 Views
  • bones
    Avatar
    Community Member
    104 Posts

    £ displaying as ? Link to this post

    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

  • Jedateach
    Avatar
    Forum Moderator
    227 Posts

    Re: £ displaying as ? Link to this post

  • Nicolaas
    Avatar
    Forum Moderator
    213 Posts

    Re: £ displaying as ? Link to this post

    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.

  • bones
    Avatar
    Community Member
    104 Posts

    Re: £ displaying as ? Link to this post

    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');

  • Nicolaas
    Avatar
    Forum Moderator
    213 Posts

    Re: £ displaying as ? Link to this post

    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

  • bones
    Avatar
    Community Member
    104 Posts

    Re: £ displaying as ? Link to this post

    Excellent, thank you.

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

    508 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.