Changeset View
Changeset View
Standalone View
Standalone View
src/docs/user/userguide/utf8.diviner
@title User Guide: UTF-8 and Character Encoding | @title User Guide: UTF-8 and Character Encoding | ||||
@group userguide | @group userguide | ||||
How Phabricator handles character encodings. | How Phorge handles character encodings. | ||||
= Overview = | = Overview = | ||||
Phabricator stores all internal text data as UTF-8, processes all text data | Phorge stores all internal text data as UTF-8, processes all text data | ||||
as UTF-8, outputs in UTF-8, and expects all inputs to be UTF-8. Principally, | as UTF-8, outputs in UTF-8, and expects all inputs to be UTF-8. Principally, | ||||
this means that you should write your source code in UTF-8. In most cases this | this means that you should write your source code in UTF-8. In most cases this | ||||
does not require you to change anything, because ASCII text is a subset of | does not require you to change anything, because ASCII text is a subset of | ||||
UTF-8. | UTF-8. | ||||
If you have a repository with source files that do not have UTF-8, you have two | If you have a repository with source files that do not have UTF-8, you have two | ||||
options: | options: | ||||
- Convert all files in the repository to ASCII or UTF-8 (see "Detecting and | - Convert all files in the repository to ASCII or UTF-8 (see "Detecting and | ||||
Repairing Files" below). This is recommended, especially if the encoding | Repairing Files" below). This is recommended, especially if the encoding | ||||
problems are accidental. | problems are accidental. | ||||
- Configure Phabricator to convert files into UTF-8 from whatever encoding | - Configure Phorge to convert files into UTF-8 from whatever encoding | ||||
your repository is in when it needs to (see "Support for Alternate | your repository is in when it needs to (see "Support for Alternate | ||||
Encodings" below). This is not completely supported, and repositories with | Encodings" below). This is not completely supported, and repositories with | ||||
files that have multiple encodings are not supported. | files that have multiple encodings are not supported. | ||||
= Support for Alternate Encodings = | = Support for Alternate Encodings = | ||||
Phabricator has some support for encodings other than UTF-8. | Phorge has some support for encodings other than UTF-8. | ||||
NOTE: Alternate encodings are not completely supported, and a few features will | NOTE: Alternate encodings are not completely supported, and a few features will | ||||
not work correctly. Codebases with files that have multiple different encodings | not work correctly. Codebases with files that have multiple different encodings | ||||
(for example, some files in ISO-8859-1 and some files in Shift-JIS) are not | (for example, some files in ISO-8859-1 and some files in Shift-JIS) are not | ||||
supported at all. | supported at all. | ||||
To use an alternate encoding, edit the repository in Diffusion and specify the | To use an alternate encoding, edit the repository in Diffusion and specify the | ||||
encoding to use. | encoding to use. | ||||
Optionally, you can use the `--encoding` flag when running `arc`, or set | Optionally, you can use the `--encoding` flag when running `arc`, or set | ||||
`encoding` in your `.arcconfig`. | `encoding` in your `.arcconfig`. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0