11.07.2015 Views

Version Control with Subversion - Login

Version Control with Subversion - Login

Version Control with Subversion - Login

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Customizing Your <strong>Subversion</strong> Experienceany locale variable that is unset. To see the list of available locales on a Unix system, runthe command locale -a.On Windows, locale configuration is done via the “Regional and Language Options” controlpanel item. There you can view and select the values of individual settings from the availablelocales, and even customize (at a sickening level of detail) several of the displayformatting conventions.<strong>Subversion</strong>'s Use of LocalesThe <strong>Subversion</strong> client, svn, honors the current locale configuration in two ways. First, it noticesthe value of the LC_MESSAGES variable and attempts to print all messages in the specifiedlanguage. For example:$ export LC_MESSAGES=de_DE$ svn help catcat: Gibt den Inhalt der angegebenen Dateien oder URLs aus.Aufruf: cat ZIEL[@REV]...…This behavior works identically on both Unix and Windows systems. Note, though, thatwhile your operating system might have support for a certain locale, the <strong>Subversion</strong> clientstill may not be able to speak the particular language. In order to produce localized messages,human volunteers must provide translations for each language. The translations arewritten using the GNU gettext package, which results in translation modules that end <strong>with</strong>the .mo filename extension. For example, the German translation file is named de.mo.These translation files are installed somewhere on your system. On Unix, they typically livein /usr/share/locale/, while on Windows they're often found in the share\locale\folder in <strong>Subversion</strong>'s installation area. Once installed, a module is named after the programfor which it provides translations. For example, the de.mo file may ultimately end upinstalled as /usr/share/locale/de/LC_MESSAGES/subversion.mo. By browsingthe installed .mo files, you can see which languages the <strong>Subversion</strong> client is able to speak.The second way in which the locale is honored involves how svn interprets your input. Therepository stores all paths, filenames, and log messages in Unicode, encoded as UTF-8. Inthat sense, the repository is internationalized—that is, the repository is ready to accept inputin any human language. This means, however, that the <strong>Subversion</strong> client is responsiblefor sending only UTF-8 filenames and log messages into the repository. To do this, it mustconvert the data from the native locale into UTF-8.For example, suppose you create a file named caffè.txt, and then when committing thefile, you write the log message as “Adesso il caffè è più forte.” Both the filename and thelog message contain non-ASCII characters, but because your locale is set to it_IT, the<strong>Subversion</strong> client knows to interpret them as Italian. It uses an Italian character set to convertthe data to UTF-8 before sending it off to the repository.Note that while the repository demands UTF-8 filenames and log messages, it does notpay attention to file contents. <strong>Subversion</strong> treats file contents as opaque strings of bytes,and neither client nor server makes an attempt to understand the character set or encodingof the contents.Character Set Conversion ErrorsWhile using <strong>Subversion</strong>, you might get hit <strong>with</strong> an error related to character set conversions:svn: Can't convert string from native encoding to 'UTF-8':…svn: Can't convert string from 'UTF-8' to native encoding:200

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!