Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » UTF-8 Bug

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 1266 Views
  • Johnny
    Avatar
    Community Member
    34 Posts

    UTF-8 Bug Link to this post

    Hi UncleCheeze!

    Sorry to hassle with that, but there seems to be a UTF-8 encoding bug using the DataObjectManager and the latest trunk release of SilverStripe. This wasn't happening before.

    I need the latest trunk release because I need translations. Since the latest trunk release is more stable than the beta release, I have no choice but using it. Why SS aren't releasing a stable 2.3.2 release? I donnu.

    But here's the bug. Maybe there's a quick fix. I hope so :

    Looking at the forum, SilverStripe's team claim that they handle UTF-8 caracters. All data is coded in UTF-8 values. So, if I have a page with accents in any text fields, it'll encode properly. Even though phpMyAdmin won't show correctly the accents, in the CMS and in the Live site, the accents show correctly.

    If I use your DataObjectModule, I can enter UTF-8 caracters. They show well in the popup. But in the list, and in the live site, they don't show correctly. If I open the popup (edit the record) again, the accent shows well, but in the list, they don't. And one more wierd thing : if I look the record, in PhpMyAdmin, the accents show correctly (the normal behavior is they don't show correctly... because SS doesn't use MySQL directive SET CHARSET = 'utf-8').

    I would like to send you a picture. But the forum doesn't allow me.

    Any idea?

    Thanks, JP

  • Johnny
    Avatar
    Community Member
    34 Posts

    Re: UTF-8 Bug Link to this post

    picture? How can I send a picture as an attachment?

  • Johnny
    Avatar
    Community Member
    34 Posts

    Re: UTF-8 Bug Link to this post

    Here's a PDF explaining the bug :
    PDF

  • Johnny
    Avatar
    Community Member
    34 Posts

    Re: UTF-8 Bug Link to this post

    RESOLVED !!!!!

    Please, include charset meta-information in the head of your templates :

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
       <head>
          <% base_tag %>
          <meta content="text/html; charset=utf-8" http-equiv="Content-type"/>
       </head>

    Thanks!

    JP

  • UncleCheese
    Avatar
    4085 Posts

    Re: UTF-8 Bug Link to this post

    Whew! Thanks a lot, Johnny. Glad it was a quick fix. You rock!

    1266 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.