• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Searching chinese is actually working

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A few topics in the forum talked about the chinese search problem, and a simple test on my local installation showed i had the same problem. So I decided to tackle this problem. Surprisingly it turns out it's supported already!!!

My environment:
Windows XP SP2
Postgres 8.1 on local machine, UTF-8 DB creation

There're two word matching modes in jforum,"equal" and "like", "equal" means you search for a word, while "like" search for a series of characters. When generating SQL, "equals" -> = while "like"-> like

So, the cause is quite clear, you need to change the mode to "like" since default is "equal", simply add the following line to jforum-custom.conf. Or change in SystemGlobals.properties.

search.word.matching = like

In fact, if you don't change the mode, search for partial english word also doesn't return anything.

Roy

[originally posted on jforum.net by luorihui]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oops, forgot to mention JForum version, it's JForum 2.1.6

Roy
[originally posted on jforum.net by luorihui]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's right.

The point of "equal" being the default value is that "like" performs worst, so I leave it to the board admin.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This search trick is working excellent

Today, I just installed the 2.1.6 on a tomcat 5.5 with 5.0 mysql, chinese works.

remember to
1. CREATE DATABASE jforum CHARACTER SET utf8;
2. database.connection.string=jdbc\:mysql\://${database.connection.host}\:${database.connection.port}/${database.connection.dbname}?user\=${database.connection.username}&password\=${database.connection.password}&autoReconnect\=true&useUnicode\=true&characterEncoding\=utf8&useNewIO\=false&zeroDateTimeBehavior\=convertToNull&useServerPrepStmts\=false

in jforum-custom.conf file (remember, dont edit in mysql.properties file only, the running instance only read jforum-custom.conf based on the log output from the application that I read)

if it doesnt work, do #3
3. URIEncoding="UTF-8" useBodyEncodingForURI="true" in tomcat\conf\server.xml

Good luck to everyone who have problem with jforum in chinese. Now it is the time to try LDAP.
[originally posted on jforum.net by Matthew.Kwong]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!