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

SheriffenSheriffen
edited May 2010 in Vanilla 2.0 - 2.8
Hey!
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?

Comments

  • Utf-8 is recommended.
  • 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..
  • Did you check if encoding is really the problem?
  • 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?
  • SOLVED:
    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?
  • SS ✭✭
    Confirm the problem.
    URL?DeliveryType=VIEW&DeliveryMethod=JSON

    All characters becomes unreadable.

  • 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']);
  • @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?
    cheers
Sign In or Register to comment.