Skip to content

Instantly share code, notes, and snippets.

View gzix's full-sized avatar

gzix gzix

  • Atchai Digital
  • Bangkok, Thailand
View GitHub Profile
@gzix
gzix / gist:1509489
Created December 22, 2011 08:16
Drupal-7.10 core search patch for Thai language (temp dirty hack). แฮ็ก drupal core เพื่อให้ index และค้นหาคำภาษาไทยได้ (เอาไว้ใช้ชั่วคราว เพราะแฮ็กแบบนี้มันเห็นแก่ตัว ถ้าคนจีน ญี่ปุ่น เกาหลี มาเห็นคงโดนด่า เพราะขโมย unicode range ภาษาเค้าให้เป็นภาษาไทย
diff --git a/modules/search/search.module b/modules/search/search.module
index 518272a..c6c44d1 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -54,11 +54,11 @@ define('PREG_CLASS_PUNCTUATION',
*
* @see search_expand_cjk()
*/
-define('PREG_CLASS_CJK', '\x{1100}-\x{11FF}\x{3040}-\x{309F}\x{30A1}-\x{318E}' .
- '\x{31A0}-\x{31B7}\x{31F0}-\x{31FF}\x{3400}-\x{4DBF}\x{4E00}-\x{9FCF}' .