Changes between Version 1 and Version 2 of TracUnicode
- Timestamp:
- 03/12/21 11:54:14 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracUnicode
v1 v2 1 = Unicode Support in Trac = 1 = Unicode Support in Trac 2 2 3 [[TracGuideToc]] 3 4 4 Trac stores all text using UTF-8 encoding, including text in tickets and wiki pages. Internal processing of text uses true Unicode representations.5 Trac encodes all text using [wikipedia:UTF-8], including text in tickets and wiki pages. Internal processing of text uses true [wikipedia:Unicode] representations. As such, it supports most commonly used character encodings. 5 6 6 As such, it supports most (all?) commonly used character encodings. 7 If the default encoding in your source code repository is not UTF-8, you can specify it in your [TracIni#trac-section trac.ini] file: 8 {{{#!ini 9 default_charset = gbk 10 }}} 7 11 8 If your encoding is not UTF-8, you can use [wiki:TracModPython mod_python] to handle it. For example, if your local encoding is gbk, you can set 9 default_charset = gbk 10 in trac.ini. 12 Also ensure that your [trac:DatabaseBackend database] stores its data in UTF-8, otherwise results may be unpredictable. 11 13 12 You also must make sure that your [wiki:DatabaseBackend database backend] stores its data in UTF-8; otherwise strange things will happen.14 To convert your database to UTF-8, the easiest way is to create a dump of the database, convert it into UTF-8, for example using [http://www.gnu.org/software/libiconv/documentation/libiconv/iconv.1.html iconv], and then import it back into the database. 13 15 14 To convert your database to UTF-8, the easiest way is to dump the database, convert the dump into UTF-8 and then import the converted dump back into the database.[[BR]] 15 You can use [http://www.gnu.org/software/libiconv/documentation/libiconv/iconv.1.html iconv] to convert the dump. 16 == Examples 16 17 18 === Arabic 17 19 18 == Examples == 20 تراك يقوم بحفظ كل الكلمات باستخدام صيغة UTF-8، بما في ذلك الكلمات المستخدمة في صفحات التيكت والويكي. 19 21 20 === Arabic === 21 ???? ???? ???? ?? ??????? ???????? ???? UTF-8? ??? ?? ??? ??????? ????????? ?? ????? ?????? ???????. 22 === Bulgarian 22 23 23 === Bulgarian === 24 ??????????? ???? ?????? ??? 24 Българският език работи ли? 25 25 26 === ?esky === 27 ?eština v kódování UTF-8, žádný problém. 26 === Česky 28 27 29 === Chinese === 30 Traditional: ????, ????; Simplified: ????????? 28 Čeština v kódování UTF-8, žádný problém. 31 29 32 === Croatian === 33 Ako podržava srpski i slovenski mora podržavati i Hrvatski - ??žš? ??ŽŠ? 30 === Chinese 34 31 35 === English === 32 Traditional: 繁體中文, 漢字測試 33 34 Simplified: 简体中文,汉字测试 35 36 === Croatian 37 38 Ako podržava srpski i slovenski mora podržavati i Hrvatski - čćžšđ ČĆŽŠĐ. 39 40 === English 41 36 42 Yes indeed, Trac supports English. Fully. 37 43 38 === Français === 39 Il est possible d'écrire en Français : à, ç, û, ... 44 === Français 40 45 41 === German === 42 Trac-Wiki muß auch deutsche Umlaute richtig anzeigen: ö, ä, ü, Ä, Ö, Ü; und das scharfe ß 46 Il est possible d'écrire en Français : à, ç, û. 43 47 44 === Greek === 45 ?? ???????? ?????????????? ??????? ??????. 48 === German 46 49 47 === Hebrew === 48 ??? ???? ????? ?????? ??? ?? ???? ?? 50 Trac-Wiki muß auch deutsche Umlaute richtig anzeigen: ö, ä, ü, Ä, Ö, Ü; und das scharfe ß. 49 51 50 === Hindi === 51 ?? ?????? ???? 52 === Greek 52 53 53 === Hungarian === 54 Árvízt?r? tükörfúrógép 54 Τα Ελληνικά υποστηρίζονται επαρκώς επίσης. 55 55 56 === Icelandic === 56 === Hebrew 57 58 אני יכול לאכול זכוכית וזה לא מזיק לי 59 60 === Hindi 61 62 अब हिन्दी में। 63 64 === Hungarian 65 66 Árvíztűrő tükörfúrógép. 67 68 === Icelandic 69 57 70 Ævar sagði við ömmu sína: Sjáðu hvað ég er stór! 58 71 59 === Japanese === 60 ?? ???? ???? ?????? ????? 72 === Japanese 61 73 62 === Korean === 63 ???? ??? ??????. ? ????? ?? 74 漢字 ひらがな カタカナ ハンカクカナ 日本語試験 64 75 65 === Latvian ===76 === Korean 66 77 67 Latviešu valoda ar? str?d?! 78 이번에는 한글로 써보겠습니다. 잘 보이나요? 한글. 68 79 69 === Lithuanian === 70 Sudalyvaukime ir mes. Ar veikia lietuviškos raid?s? ?????š??ž ?????Š??Ž Žinoma, kad veikia :) 71 Kas tie mes? 80 === Latvian 72 81 73 === Persian (Farsi) === 74 ??? ?? ??? ????? ??? ??? ????? ????? ?????? ????? ???? ??? ???? ??? ?? ???? ?? ?? ? ??? ????? ???? ????? ????? ???? ?? HTML ??????? ????. 82 Latviešu valoda arī strādā! 83 84 === Lithuanian 85 86 Sudalyvaukime ir mes. Ar veikia lietuviškos raidės? ąčęėįšųūž ĄČĘĖĮŠŲŪŽ Žinoma, kad veikia. Kas tie mes? 87 88 === Persian (Farsi) 89 90 این یک متن فارسی است ولی امکان نوشتن مستقیم فارسی نیست چون حالت متن از راست به چپ و جود ندارد برای فارسی نوشتن باید از HTML استفاده کنید. 75 91 {{{ 76 92 #!html 77 93 <div dir="rtl"> 78 94 }}} 79 ??? ????? ?? ??? ?? ???? ?? ?? ????? ??? ?? ?? HTML ????? ??? ?? ????? 12345 ? ???? ????? ABCDEF ?? ??? ?????? ????? ???? ????.95 این نمونه یک متن از راست به چپ فارسی است که در HTML نوشته شده تا اعداد 12345 و حروف لاتین ABCDEF در محل خودشان نمایش داده شوند. 80 96 {{{ 81 97 #!html … … 83 99 }}} 84 100 85 === Polish === 86 Pchn?? w t? ?ód? je?a lub osiem skrzy? fig; Nocna g?eg?ó?ka zawsze dzienn? przekuka. 101 === Polish 87 102 88 === Portuguese === 103 Pchnąć w tę łódź jeża lub osiem skrzyń fig. Nocna gżegżółka zawsze dzienną przekuka. 104 105 === Portuguese 106 89 107 É possível guardar caracteres especias da língua portuguesa, incluindo o símbolo da moeda européia '€', trema 'ü', crase 'à', agudos 'áéíóú', circunflexos 'âêô', til 'ãõ', cedilha 'ç', ordinais 'ªº', grau '°¹²³'. 90 108 91 === Russian === 92 ???????? ???????? ?????: ??????? ????????... ? ????? "?" ????... 109 === Russian 93 110 94 === Serbian === 95 Podržan, uprkos ?injenici da se za njegovo pisanje koriste ??? ??? ????????. 111 Проверка русского языка: кажется работает. И буква "ё" есть. 96 112 97 === Slovenian === 98 Ta suhi škafec puš?a vodo že od nekdaj! 113 === Serbian 99 114 100 === Spanish === 101 Esto es un pequeño texto en Español, donde el veloz murciélago hindú comía cardlllo y kiwi 115 Podržan, uprkos činjenici da se za njegovo pisanje koriste чак два алфабета. 102 116 103 === Swedish === 117 === Slovenian 118 119 Ta suhi škafec pušča vodo že od nekdaj! 120 121 === Spanish 122 123 Esto es un pequeño texto en Español, donde el veloz murciélago hindú comía cardillo y kiwi. 124 125 === Swedish 126 104 127 Räven raskar över isen med luva på. 105 128 106 === Thai === 107 Trac ??????????????????????????! 129 === Thai 108 130 109 === Ukrainian === 110 ????????? ??????????? ????... 131 Trac แสดงภาษาไทยได้อย่างถูกต้อง! 111 132 112 === Urdu === 113 ???? ???? ??? ????? ???? ??? 133 === Ukrainian 114 134 115 === Vietnamese === 116 Vi?t ti?ng Vi?t c?ng ???c. Nh?ng search t? ti?ng Vi?t thì không bôi vàng ???c. (Keyword(s) in Vietnamese search result can not be hightlighted !!!!). 135 Перевірка української мови. 136 137 === Urdu 138 139 ٹریک اردو بھی سپورٹ کرتا ہے۔ 140 141 === Vietnamese 142 143 Viết tiếng Việt cũng được.