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