練功房推薦書單

  • Google!Android 3手機應用程式設計入門(第四版)
  • 賈伯斯傳(軟皮精裝版)
  • 猛虎出閘制霸版:最新OCP Java SE 6 Programmer專業認證(附原始程式碼及範例檔)
  • SCWCD 5 猛虎出閘:Java Web 應用程式專業認證
[v2.1.7] 中文搜尋問題解法  XML
Forum Index » JForum中文社群 JForum Chinese Users Community
Author Message
andowson

六段學員
[Avatar]

Joined: 2007-01-02 22:20:40
Messages: 652
Location: 台北
Offline

修改WEB-INF/config/jforum-custom.conf,加上
search.word.matching = like
這樣會覆寫掉SystemGlobals.properties裡面原來的設定
search.word.matching = equals

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

This message was edited 3 times. Last update was at 2007-03-25 00:28:38


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

六段學員
[Avatar]

Joined: 2007-01-02 22:20:40
Messages: 652
Location: 台北
Offline

補充說明,有關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編碼兩次)

This message was edited 5 times. Last update was at 2007-03-25 00:41:03


分享經驗 累積智慧
[WWW] [MSN]
 
Forum Index » JForum中文社群 JForum Chinese Users Community
Go to: