| 1 | = Unicode Support in Trac |
| 2 | |
| 3 | [[TracGuideToc]] |
| 4 | |
| 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 the most commonly used character encodings. |
| 6 | |
| 7 | If the default encoding of your source code repository is not UTF-8, you can specify it in [TracIni#trac-default_charset-option "[trac] default_charset"]: |
| 8 | {{{#!ini |
| 9 | default_charset = gbk |
| 10 | }}} |
| 11 | |
| 12 | Ensure that your [trac:DatabaseBackend database] stores its data in UTF-8, otherwise results may be unpredictable. |
| 13 | |
| 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 [https://www.gnu.org/software/libiconv/documentation/libiconv/iconv.1.html iconv], and then re-import it. |
| 15 | |
| 16 | == Examples |
| 17 | |
| 18 | === Arabic |
| 19 | |
| 20 | تراك يقوم بحفظ كل الكلمات باستخدام صيغة UTF-8، بما في ذلك الكلمات المستخدمة في صفحات التيكت والويكي. |
| 21 | |
| 22 | === Bulgarian |
| 23 | |
| 24 | Българският език работи ли? |
| 25 | |
| 26 | === Česky |
| 27 | |
| 28 | Čeština v kódování UTF-8, žádný problém. |
| 29 | |
| 30 | === Chinese |
| 31 | |
| 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 | |
| 42 | Yes indeed, Trac supports English. Fully. |
| 43 | |
| 44 | === Français |
| 45 | |
| 46 | Il est possible d'écrire en Français : à, ç, û. |
| 47 | |
| 48 | === German |
| 49 | |
| 50 | Trac-Wiki muß auch deutsche Umlaute richtig anzeigen: ö, ä, ü, Ä, Ö, Ü; und das scharfe ß. |
| 51 | |
| 52 | === Greek |
| 53 | |
| 54 | Τα Ελληνικά υποστηρίζονται επαρκώς επίσης. |
| 55 | |
| 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 | |
| 70 | Ævar sagði við ömmu sína: Sjáðu hvað ég er stór! |
| 71 | |
| 72 | === Japanese |
| 73 | |
| 74 | 漢字 ひらがな カタカナ ハンカクカナ 日本語試験 |
| 75 | |
| 76 | === Korean |
| 77 | |
| 78 | 이번에는 한글로 써보겠습니다. 잘 보이나요? 한글. |
| 79 | |
| 80 | === Latvian |
| 81 | |
| 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 استفاده کنید. |
| 91 | {{{ |
| 92 | #!html |
| 93 | <div dir="rtl"> |
| 94 | }}} |
| 95 | این نمونه یک متن از راست به چپ فارسی است که در HTML نوشته شده تا اعداد 12345 و حروف لاتین ABCDEF در محل خودشان نمایش داده شوند. |
| 96 | {{{ |
| 97 | #!html |
| 98 | </div> |
| 99 | }}} |
| 100 | |
| 101 | === Polish |
| 102 | |
| 103 | Pchnąć w tę łódź jeża lub osiem skrzyń fig. Nocna gżegżółka zawsze dzienną przekuka. |
| 104 | |
| 105 | === Portuguese |
| 106 | |
| 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 '°¹²³'. |
| 108 | |
| 109 | === Russian |
| 110 | |
| 111 | Проверка русского языка: кажется работает. И буква "ё" есть. |
| 112 | |
| 113 | === Serbian |
| 114 | |
| 115 | Podržan, uprkos činjenici da se za njegovo pisanje koriste чак два алфабета. |
| 116 | |
| 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 | |
| 127 | Räven raskar över isen med luva på. |
| 128 | |
| 129 | === Thai |
| 130 | |
| 131 | Trac แสดงภาษาไทยได้อย่างถูกต้อง! |
| 132 | |
| 133 | === Ukrainian |
| 134 | |
| 135 | Перевірка української мови. |
| 136 | |
| 137 | === Urdu |
| 138 | |
| 139 | ٹریک اردو بھی سپورٹ کرتا ہے۔ |
| 140 | |
| 141 | === Vietnamese |
| 142 | |
| 143 | Viết tiếng Việt cũng được. |