Author Topic: Word wrap function for comment text cause problem in big5 encoding  (Read 2881 times)

0 Members and 1 Guest are viewing this topic.

Offline chlee

  • Full Member
  • ***
  • Posts: 164
    • View Profile
    • http://chest.mc.ntu.edu.tw/
I find that if I enable word wrap for comment text, the comment text will not show traditional chinese characters (big5 encoding) correctly. If I turn it off, the comment text displayed without problem. Thus, the problem must be in this line in the function format_text in includes/functions.php
Code: [Select]
$text = preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$word_wrap."})/i", " \\1\n", $text);

The problem is specific to big5 encoding. Any solution?