Jump to:

23453 Posts in 18902 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » Unicode in templates

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 893 Views
  • Imbrondir
    Community Member
    13 Posts

    Unicode in templates Link to this post

    I'm writing primarily a Norwegian site but writing the special Norwegian characters "ÆØÅ" inside templates doesn't work. Some question marks appears where the characters arrives. It works writing in the CMS editor to the database and then displaying, however in templates no. Is unicode in templates impossible?

    My _config.php:


    //test setting charset:

    // This line set's the current theme. More themes can be
    // downloaded from http://www.silverstripe.org/themes/

    // Set the site locale

    //set default language

    //Set languages to use
       'nb_NO', //Norwegian bokmal
       'en_US', //US english

    Object::add_extension('SiteTree', 'Translatable');
    Object::add_extension('SiteConfig', 'Translatable'); //2.4 or newer only

    // enable nested URLs for this site (e.g. page/sub-page/)

  • ayyurek
    Community Member
    41 Posts

    Re: Unicode in templates Link to this post

    Which editor do you use? Try to use Notepad++ and be sure that .ss files are having encoding 'UTF-8 without BOM'. Silverstripe has no problem with unicode characters.

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.