Bug #281

Cannot use Chinese in articles' title

Added by contagiouskimo-yahoo-com-tw - 1272 days ago. Updated 791 days ago.

Status :Closed Start :
Priority :Normal Due date :
Assigned to :tobi - % Done :

0%

Category :frontend
Target version :2.5
Resolution :

fixed


Description

Cannot use Chinese (or anyother Asian Character) as articles' title.
The problem is cause by the strip_title function in app/models/article.rb. The function strip all non-word character without considering Asian Character. Simply add
$KCODE = 'UTF8'
require 'jcode'

anywhere before the gsub will solved the problem
However, I am not sure where I should put these lines because there may be other placese have the same problem.

History

07/06/2005 07:02 PM - contagiouskimo-yahoo-com-tw -

Later I find that the live search cannot work properly for Asian Characters, either.
So I think it's better to put the KCODE-Line at the very beginning of articles.rb

07/10/2005 05:29 PM - scoop -

  • Status changed from New to Closed
  • Resolution set to fixed

(In r306) * Force ruby into UTF-8 mode to make special characters in certain areas possible (fixes #121) []

Also available in: Atom PDF