Wednesday, 15 December 2010

changing locale

Working with real (decimal) numbers can be problematic when changing between computer with difference language (locale) settings. For example, in the Netherlands a comma is used for the decimal, i.e., sqrt(2) becomes something like 1,4142. In the US a dot is used, as is in most? scientific fields. So, sqrt(2) becomes 1.4142. Input files made up in one locale will be misread in another locale.

Changing to US locale is easily done:
export LANG=en_US.UTF-8
setenv LANG en_US.UTF-8

No comments:

Post a Comment