Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Paging special characters

edited May 2010 in Vanilla 2.0 - 2.8
When viewing older comments with the paging in a discussion my special swedish characters show up like crap. How do I set proper charcode to this?


  • Options
    Utf-8 is recommended.
  • Options
    Yeah I use utf-8 for all my in and out of the database and it works like a charm... eeexpcet for when jquery is loading the data. Then the characters show up all messy but when I reload the page and PHP fetches it, it works again..
  • Options
    Did you check if encoding is really the problem?
  • Options
    Honestly I don't know what the problem is. The only thing I know is that when jquery loads my page through AJAX it doesn't work but if I load it like normal, with PHP it does. Just wanted to know if anyone had a clue?
  • Options
    comment out line 774 in class.controller.php

    //$this->_Json['Data'] = utf8_encode($this->_Json['Data']);

    makes my characters show up normally, isn't this the opposite of what should happen?
  • Options
    SS ✭✭
    Confirm the problem.

    All characters becomes unreadable.

  • Options
    SS ✭✭
    edited June 2010
    Looks like that no need do utf8_encode() if default charset is UTF-8. Try fix:
    if (C('Garden.Charset') != 'utf-8') $this->_Json['Data'] = utf8_encode($this->_Json['Data']);
  • Options
    @S where do you suppose to add this line?
    instead of the old? why dont you post it to the issue tracker then, to add to the next vanilla rc?
    ok, i just cmmented that line, and it works fine. is there any cons for simly commenting that line instead of editing to your code?
Sign In or Register to comment.