Page MenuHomePhabricator
Diviner Phabricator User Docs User Guide: UTF-8 and Character Encoding

User Guide: UTF-8 and Character Encoding
Phabricator User Documentation (Application User Guides)

How Phabricator handles character encodings.

Overview

Phabricator 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, 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 UTF-8.

If you have a repository with source files that do not have UTF-8, you have two options:

  • Convert all files in the repository to ASCII or UTF-8 (see "Detecting and Repairing Files" below). This is recommended, especially if the encoding problems are accidental.
  • Configure Phabricator to convert files into UTF-8 from whatever encoding your repository is in when it needs to (see "Support for Alternate Encodings" below). This is not completely supported, and repositories with files that have multiple encodings are not supported.

Support for Alternate Encodings

Phabricator has some support for encodings other than UTF-8.

NOTE: Alternate encodings are not completely supported, and a few features will 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 supported at all.

To use an alternate encoding, edit the repository in Diffusion and specify the encoding to use.

Optionally, you can use the --encoding flag when running arc, or set encoding in your .arcconfig.