| 1 | = Unicode Support in Trac |
| 2 | |
| 3 | [[TracGuideToc]] |
| 4 | |
| 5 | Trac encodes all text using [https://en.wikipedia.org/wiki/UTF-8 UTF-8], including text in tickets and wiki pages. Internal processing of text uses true [https://en.wikipedia.org/wiki/Unicode 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 | === Dutch |
| 41 | |
| 42 | Enquêtes in de privésfeer zijn altijd geëngageerd. |
| 43 | |
| 44 | === English |
| 45 | |
| 46 | Yes indeed, Trac supports English. Fully. |
| 47 | |
| 48 | === Français |
| 49 | |
| 50 | Il est possible d'écrire en Français : à, ç, û. |
| 51 | |
| 52 | === German |
| 53 | |
| 54 | Trac-Wiki muß auch deutsche Umlaute richtig anzeigen: ö, ä, ü, Ä, Ö, Ü; und das scharfe ß. |
| 55 | |
| 56 | === Greek |
| 57 | |
| 58 | Τα Ελληνικά υποστηρίζονται επαρκώς επίσης. |
| 59 | |
| 60 | === Hebrew |
| 61 | |
| 62 | אני יכול לאכול זכוכית וזה לא מזיק לי |
| 63 | |
| 64 | === Hindi |
| 65 | |
| 66 | अब हिन्दी में। |
| 67 | |
| 68 | === Hungarian |
| 69 | |
| 70 | Árvíztűrő tükörfúrógép. |
| 71 | |
| 72 | === Icelandic |
| 73 | |
| 74 | Ævar sagði við ömmu sína: Sjáðu hvað ég er stór! |
| 75 | |
| 76 | === Japanese |
| 77 | |
| 78 | 漢字 ひらがな カタカナ ハンカクカナ 日本語試験 |
| 79 | |
| 80 | === Korean |
| 81 | |
| 82 | 이번에는 한글로 써보겠습니다. 잘 보이나요? 한글. |
| 83 | |
| 84 | === Latvian |
| 85 | |
| 86 | Latviešu valoda arī strādā! |
| 87 | |
| 88 | === Lithuanian |
| 89 | |
| 90 | Sudalyvaukime ir mes. Ar veikia lietuviškos raidės? ąčęėįšųūž ĄČĘĖĮŠŲŪŽ Žinoma, kad veikia. Kas tie mes? |
| 91 | |
| 92 | === Persian (Farsi) |
| 93 | |
| 94 | این یک متن فارسی است ولی امکان نوشتن مستقیم فارسی نیست چون حالت متن از راست به چپ و جود ندارد برای فارسی نوشتن باید از HTML استفاده کنید. |
| 95 | {{{ |
| 96 | #!html |
| 97 | <div dir="rtl"> |
| 98 | }}} |
| 99 | این نمونه یک متن از راست به چپ فارسی است که در HTML نوشته شده تا اعداد 12345 و حروف لاتین ABCDEF در محل خودشان نمایش داده شوند. |
| 100 | {{{ |
| 101 | #!html |
| 102 | </div> |
| 103 | }}} |
| 104 | |
| 105 | === Polish |
| 106 | |
| 107 | Pchnąć w tę łódź jeża lub osiem skrzyń fig. Nocna gżegżółka zawsze dzienną przekuka. |
| 108 | |
| 109 | === Portuguese |
| 110 | |
| 111 | É 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 '°¹²³'. |
| 112 | |
| 113 | === Russian |
| 114 | |
| 115 | Проверка русского языка: кажется работает. И буква "ё" есть. |
| 116 | |
| 117 | === Serbian |
| 118 | |
| 119 | Podržan, uprkos činjenici da se za njegovo pisanje koriste чак два алфабета. |
| 120 | |
| 121 | === Slovenian |
| 122 | |
| 123 | Ta suhi škafec pušča vodo že od nekdaj! |
| 124 | |
| 125 | === Spanish |
| 126 | |
| 127 | Esto es un pequeño texto en Español, donde el veloz murciélago hindú comía cardillo y kiwi. |
| 128 | |
| 129 | === Swedish |
| 130 | |
| 131 | Räven raskar över isen med luva på. |
| 132 | |
| 133 | === Thai |
| 134 | |
| 135 | Trac แสดงภาษาไทยได้อย่างถูกต้อง! |
| 136 | |
| 137 | === Ukrainian |
| 138 | |
| 139 | Перевірка української мови. |
| 140 | |
| 141 | === Urdu |
| 142 | |
| 143 | ٹریک اردو بھی سپورٹ کرتا ہے۔ |
| 144 | |
| 145 | === Vietnamese |
| 146 | |
| 147 | Viết tiếng Việt cũng được. |