close
Warning:
Failed to sync with repository "(default)": [Errno 12] Cannot allocate memory; repository information may be out of date. Look in the Trac log for more information including mitigation strategies.
- Timestamp:
-
2015-03-21T12:46:07Z (9 years ago)
- Author:
-
trac
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v3
|
v4
|
|
2 | 2 | [[TracGuideToc]] |
3 | 3 | |
4 | | Trac stores all text using UTF-8 encoding, including text in tickets and wiki pages. Internal processing of text uses true Unicode representations. |
| 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 | 5 | |
6 | | As such, it supports most (all?) commonly used character encodings. |
| 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 | }}} |
7 | 10 | |
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. |
| 11 | Also ensure that your [trac:DatabaseBackend database] stores its data in UTF-8, otherwise results may be unpredictable. |
11 | 12 | |
12 | | You also must make sure that your [trac:DatabaseBackend database backend] stores its data in UTF-8; otherwise strange things will happen. |
13 | | |
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 | | |
| 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. |
17 | 14 | |
18 | 15 | == Examples == |