Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » problem with UTF8 files (bug?)

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1281 Views
  • xammmax
    Community Member
    1 Post

    problem with UTF8 files (bug?) Link to this post


    i'm now working a few days with silverstripe, i love it. many thanks for this great cms!

    today i run into troubles, because here in switzerland use "umlaut" characters like the ä, ö, ü. as i'm lazy too (don't like to write ä etc. all the time), i'm used to save the files in UTF8.

    on the module i'm working on, i created several "core" files (.php) and..
    IE wasen't able to display the styled page, only text without any images / css etc.

    tracing back the problem, i could figure out the following:
    if the rendered page uses two or more .php files saved as UTF8, then the problem occur. with only one .php it's working fine.
    tech: for each file more then two the UTF8 BOM (byte order mark) is rendered out to the html.

    the work-a-round for me, i changed all my files to iso8859-1 and now it's working as expected.

    please note: the problem is only visible in IE, firefox does work with the "malformed" html.
    i tried with with silverstripe 2.2.2 and the new 2.2.3, the same behavior.

    (please see the attached pdf showing screenshots of the above)

    best, xammmax

  • Ingo
    Forum Moderator
    801 Posts

    Re: problem with UTF8 files (bug?) Link to this post

    Hey xammmax, what HTTP Content-Type is the response given (you can find this out in Firefox Page Information for example)? Do you have any Content-Type <meta> tags? SilverStripe consistenly works with UTF-8 both in code- and database-storage, usually this doesn't make any problems (apart from specific logic like searchforms).

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.