A locale is a set of parameters that defines the user's language, country and any special variant preferences that the user wants to see in their user interface.

learn more… | top users | synonyms

37
votes
2answers
1k views

Why is there no “Euro English” locale?

I used to use the somewhat whimsical en_DK.UTF-8 locale when installing a new system because that would produce (roughly) the locale results I wanted, even though I am not in Denmark. Measurements ...
26
votes
3answers
12k views

What does “LC_ALL=C” do?

What does the C value for LC_ALL do in Unix-like systems? I know that it forces the same locale for all aspects but what does C do?
17
votes
3answers
10k views

What charset encoding is used for filenames and paths on Linux?

Does it depend on what file system I use? For example, ext2/ext3/ext4 but also what happens when I insert one of those "joliet" CD-ROMs with ISO 9660? I've heard that POSIX contains some sort of spec ...
14
votes
3answers
3k views

Understanding Unix file name encoding

I have a hard time understanding how the file name encoding works. On unix.SE I find contradicting explanations. File names are stored as characters To quote another answer: Several questions about ...
14
votes
4answers
9k views

Why is almost every program complaining about my locale?

I'm using Arch Linux, and I've followed the directions on the wiki about setting my locale. Nearly every program that runs complains about the locale - even locale. It looks like this: % locale ...
12
votes
3answers
3k views

Does (should) LC_COLLATE affect character ranges?

Collation order through LC_COLLATE defines not only the sort order of individual characters, but also the meaning of character ranges. Or does it? Consider the following snippet: unset LANGUAGE ...
11
votes
1answer
238 views

Command to retrieve the list of characters in a given character class in the current locale

What could be way to retrieve a list of all the characters in a given character class (like blank, alpha, digit...) in the current locale. For instance, LC_ALL=en_GB.UTF-8 that-command blank ...
9
votes
5answers
2k views

Weird Stuff in Terminal When I Hit Tab

For some reason, today, everytime I hit tab in the terminal this shows up: cat bash: warning: setlocale: LC_CTYPE: cannot change locale (en_CA) Display all 150 possibilities? (y or n) This ...
8
votes
2answers
739 views

Why are wc -m and wc -c different?

As a C programmer, I was surprised to see that wc -c (which count the number of bytes), and wc -m (which counts the number of characters) output very different results for a long, text file of mine. I ...
8
votes
2answers
12k views

ssh and character encoding

When I ssh into my VPS, I have irssi running in screen. When someone sends a unicode character (such as © or €), irssi displays garbage when I use it via the screen in a ssh session. If I connect to ...
8
votes
2answers
1k views

Output ls -l size field with digits grouped by thousands?

It is possible to make ls -l output the size field with digits grouped by thousands? If so, how? For instance: $ ls -l -rw-rw---- 1 dahl dahl 43,210,052 2012-01-01 21:52 test.py (Note the commas ...
8
votes
4answers
4k views

How do I make ls sort underscore characters first?

I like being able to name files and directories with an underscore prefix if it's something I want to keep separate from other files and directories at the same level. On Windows and Mac, for example, ...
7
votes
2answers
396 views

Set the language for a single program execution

Complete C++ i18n gettext() “hello world” example. sets the LANG environment variable using export before executing the program (Linux): export LANG=es_MX.utf8 ./hellogt Is there a way to set the ...
7
votes
2answers
61 views

texinfo: Can I write non-english info files? Such as Chinese, and how?

Most gnu manual files use info, write a texinfo then makeinfo produces info files, it's great. Can texinfo contain non-English characters then produce non-English infos or pdfs? How can I write ...
7
votes
2answers
3k views

Effect of $LANG on terminal

I'm trying to learn how the $LANG variable behaves with gnome-terminal (and its character encoding preference option). I've been using iso8859-1 (latin1) as my main character-set and all my filenames ...
7
votes
1answer
484 views

Why is bash extended-globbing variable substitution acting at the byte level?

I thought that bash variable substitution and globbing worked at character resolution, so I was rather surprised to see it acting at the byte level. Everything in my locale is en_AU.UTF-8 When ...
6
votes
3answers
269 views

Understanding environmental variables in different contexts

Trying to understand the behaviour of the environment in Linux (Ubuntu 13.04 concretely), I've find different situations where setting envirionment variables are used or defined for/in different ...
6
votes
5answers
887 views

Why does locale es_MX work but not es?

Wikipedia entry for GNU gettext shows an example where the locale is just the lanuage, "fr". Whereas the 'i18n gettext() “hello world” example' in SO has the locale value with both the language and ...
6
votes
2answers
132 views

Sorting with Perl respecting Locale Settings

Following data needs to be sorted respecting the locale sort order: wird sin wär pêche war Über Uber péché peach There was nor problem by using sort $ sort < data peach pêche péché sin Uber ...
6
votes
2answers
4k views

set LC_* but not LC_ALL

I'd like to have a German (Austria) locale (A4 paper size, 24 hour time, yyyy-mm-dd), but an English-language user interface (I don't like poor translations). I figured that the correct way to achieve ...
6
votes
2answers
178 views

Are the outputs of /proc/meminfo, /proc/cpuinfo etc always in English?

I am writing code that relies on the output of /proc/meminfo, /proc/cpuinfo etc. Are the file contents always in English? For example, will MemTotal in /proc/meminfo always be MemTotal in all locales? ...
6
votes
1answer
155 views

locale definition with French republican calendar

I wonder if it is possible to create a locale definition that would make the C library format the dates according to the French republican calendar. I expect then, for example, run `date' and get ...
6
votes
1answer
66 views

aspell installs too many languages

I have installed aspell-en and aspell-de. I have expected this will give me the choice between en and de languages. However, the package has installed many versions of en and de languages and now when ...
6
votes
1answer
505 views

Unzipping certain archives works on Windows but not on Linux

I've asked a few people and just thought about asking it here. We get sent files from an international company for design work in a zip format. Well when I run a script to unzip the files in the ...
5
votes
2answers
633 views

How to convert UTF-8 txt files to all uppercase in bash?

I have some UTF-8 .txt files which I would like to convert to all uppercase. If it was just ASCII, I could use: tr [:lower:] [:upper:] But since I'm working with diacritics and stuff, it doesn't ...
5
votes
1answer
2k views

How to get gnome-terminal in English?

Is it possible to select a different language for a specific application? On some systems I run Fedora15/Gnome in German, but want to use the Terminal in English including for the simple prompt ...
5
votes
1answer
164 views

Alphabetizing names in `ls` alias with .files not intermingled

I am currently using the following ls alias: alias ls='ls -alhGkpsq --color=auto'. This results in following directory listing. [03:35] bryson@brys ~ :$ ls total 48K 4.0K drwx------ 4 bryson 4.0K ...
5
votes
2answers
2k views

What's the default order of linux sort?

For a long period I think the default behavior of sort program is using ASCII. However, when I input the following lines into sort without any arguments: # @ I got: @ # But according to the ...
5
votes
3answers
4k views

How to fix Russian letters in a Wine application when adjusting LANG does not help?

An application with a Russian UI shows question marks instead the most of its text (some elements are rendered ok though). The system locale is English (en_US, en_IE), I've tried Ubuntu ant XUbuntu ...
5
votes
1answer
997 views

Get “date” to understand a timestamp phrase of a different language

My web-scraping scripts have long enjoyed using date -d to read in human-formatted time and date stamps like "March 11, 1999" and convert to any other format I need via the -s parameter. How might I ...
5
votes
1answer
2k views

How to use grep/ack with files in arbitrary encoding?

On my Linux desktop I have a UTF-8 locale. When I try to search some KOI8-R encoded files with grep (ack), it fails. If I manually encode the pattern into KOI8-R and pass that as an argument, it ...
5
votes
2answers
966 views

Can I change the output format of the “last” command to display the year?

I'm trying to find a way to report on the most recent login for all users on my Solaris 10 server. I'm starting with the output of the last command. Using that command, I get output like this: ...
5
votes
1answer
1k views

How do I configure setfont and loadkeys properly?

I'm installing LFS and I'm struggling with this section. My locale is sv_SE.UTF-8 and I have a Swedish keyboard. So I suppose I should enable unicode and that the keymap is sv-latin1: cat > ...
5
votes
1answer
514 views

Dead keys not working in Java Swing applications

I'm currently using Ubuntu 10.10 and Netbeans 7.0 and I can't type accented letters with dead keys any more. It's not a version specific problem seems it's related with Swing since I've got the same ...
4
votes
3answers
334 views

Use command grep and locate

How I can make the grep command locate certain words in the files specified by the routes found by the locate command? locate my.cnf | grep user (I want that grep command search the word "user" ...
4
votes
2answers
774 views

How to mount an NTFS drive as utf8 over NFS

Question How to mount a nfs share (NTFS formatted fileystem) as utf8 in CentOS 6.5? What I tried mount -o iocharset=utf8 mount -o nfs=utf8 mount -o utf8=1 mount -o utf8 Problem: When I ...
4
votes
2answers
438 views

What would break if the C locale was UTF-8 instead of ASCII?

The C locale is defined to use the ASCII charset and POSIX does not provide a way to use a charset without changing the locale as well. What would happen if the encoding of C were switched to UTF-8 ...
4
votes
2answers
336 views

'ls -l' file timestamp format

When I issue the command: ls -l The file/directory modification timestamp column (specifically the month part) is displayed in the native language of the country I'm based in instead of English. ...
4
votes
1answer
1k views

How do I reduce the size of locale-archive?

I have a need to reduce the size of the locale-archive file on some of my RHEL6 systems. Here is that file on my system: [root@-dev-007 locale]# ls -l total 96800 -rw-r--r--. 1 root root 99158704 ...
4
votes
1answer
214 views

Why is uniq ignoring Unicode and lines with a single letter?

I'm trying to combine both the American and British dictionaries into one large dictionaries, and I'm trying to remove all the duplicates from the superset, but it seems that uniq is not outputting ...
4
votes
1answer
256 views

man gives the error about locale

I have $ locale LANG=en_GB.UTF-8 LC_CTYPE=ru_RU.UTF-8 LC_NUMERIC=en_GB.UTF-8 LC_TIME=en_GB.UTF-8 LC_COLLATE=ru_RU.UTF-8 LC_MONETARY=ru_RU.UTF-8 LC_MESSAGES=en_GB.UTF-8 LC_PAPER=ru_RU.UTF-8 ...
4
votes
1answer
104 views

How can I find the sort order for ls with my locale?

I was using ls -l on a directory, and was surprised that spaces and underscores were ignored for the sort order. For example, $ echo $LANG en_AU.UTF-8 $ ls -l total 0 -rw-r--r-- 1 sparhawk sparhawk 0 ...
4
votes
1answer
63 views

date modifiers explained

Again, I found some interesting I don't understand in an info page, in info dateto be precisely: An optional modifier can follow the optional flag and width specification. The modifiers are: ...
4
votes
0answers
53 views

Set custom locales in Gnome3 (on Fedora 20)

I've created my own custom locales and placed them in /etc/locale.conf which successfully takes effect if I log in on a virtual console (Ctrl+Alt+F2). In my Gnome3 session those variables are not set, ...
4
votes
1answer
74 views

login with xdm and umlaut in password

I want use xdm to login to my machine and start my session. My password contains an umlaut. I'd rather not change the password as it is quite long and complex and I just memorized it. Login works ...
3
votes
1answer
1k views

How can I change locale/encoding to avoid getting weird characters in terminal?

I have installed tree on my ubuntu box, when i connect to it from Putty and I launch tree i get this : $ tree âââ html.vim -> xml.vim âââ js.vim -> xml.vim âââ xml.vim instead of this : $ ...
3
votes
3answers
2k views

localization of man pages on Linux (Ubuntu)

Is there an option to output a manual page in a different language? I don't want to change the computer language completely, but only specific manual pages. For example $ man -English man Man is a ...
3
votes
2answers
996 views

Where has my `uniq` or `sort -u` line gone, with some unicode characters

What is going on in the following code snippet? I'm not getting my expected output. I'd think it was a bug, but it happens for 2 different programs (uniq and sort), so I suspect it is something ...
3
votes
1answer
743 views

What is the relevance of 'en_AU' in 'LC_CTYPE'? and what is `locale LC_CTYPE` output all about?

First off: Although I can understand the relevance of geographic-region detail for LC_TIME, LC_NUMERIC, and most other LC_* vars, I don't quite see how 'en_AU' relates to LC_CTYPE... Isn't UTF-8 (and ...
3
votes
3answers
12k views

How to change locale environment variable?

I have generated en_US.utf8, et_EE.iso88591 and ru_RU.utf8 localisation files. Now if I try to change any of the locale variables to a ru_RU.utf8 or en_US.utf8, then this does not have any effect: # ...