練功房推薦書單

  • 猛虎出柙雙劍合璧版--最新 OCA / OCP Java SE 7 Programmer 專業認證 (電子書)
  • 流浪教師存零股存到3000萬(全新增修版)(書+DVD)
  • 開始在關西自助旅行(京都‧大阪‧神戶‧奈良)(全新增訂版)
  • 不敗教主的300張股票存股術

[v2.1.7] 中文搜尋問題解法 RSS feed
討論區首頁 » JForum中文社群 JForum Chinese Users Community
發表人 內容
andowson

七段學員
[Avatar]

註冊時間: 2007/1/2
文章: 711
來自: 台北
離線
修改WEB-INF/config/jforum-custom.conf,加上
search.word.matching = like
這樣會覆寫掉SystemGlobals.properties裡面原來的設定
search.word.matching = equals

參考網址:http://www.jforum.net/posts/list/2558.page

分享經驗 累積智慧
[WWW]
andowson

七段學員
[Avatar]

註冊時間: 2007/1/2
文章: 711
來自: 台北
離線
補充說明,有關encoding部分的設定參數如下:
jforum-custom.conf:
dbencoding=utf-8
encoding=UTF-8

SystemGlobals.properties:
encoding = UTF-8
mail.template.encoding = UTF-8
default.container.encoding = ISO-8859-1

Database在create時選擇unicode或UTF-8編碼,以PostgreSQL為例,
su - postgres
psql -c "create user jforum createdb;" template1
psql -c "create database jforum with encoding 'unicode';" -U jforum template1
psql -c "alter user jforum nocreatedb;" template1
psql -c "alter user jforum with encrypted password 'jforum';" template1
exit

Apache的httpd.conf:
將AddDefaultCharset註解起來
#AddDefaultCharset Big5

注意:
Tomcat的server.xml:
<Connector>不能加URIEncoding="UTF-8",否則中文搜尋功能會失效!(等於用UTF-8編碼兩次)

分享經驗 累積智慧
[WWW]
 
討論區首頁 » JForum中文社群 JForum Chinese Users Community
前往:   
行動版