Linked Questions

10
votes
5answers
2k views

Case sensitivity in square-bracket globbing

Normally, bash globbing is case sensitive: $ echo c* casefix.pike cdless chalices.py charconv.py chocolate.pike circum.py clip.pike cpustats.pike crop.pike cwk2txt.py $ echo C* CarePackage.md ...
1
vote
4answers
132 views

Is there a way to force program to output errors in English?

When I run into errors I sometimes get errors in my language set by locale. Is there a way besides switching locale to force English error messages for the sake of googling the solution?
31
votes
3answers
5k views

What's the best distro/shell-agnostic way to set environment variables?

The question says it all. I currently use Arch Linux and the zsh, but I'd like a solution that (at minimum) works both on VTs and in xterms and also (hopefully, preferably) will continue to work if I ...
3
votes
3answers
491 views

Using uniq on unicode text

I want to remove duplicate lines from a file with words of Syriac script. The source file has 3 lines, 1st and 3rd are identical. $ cat file.txt ܐܒܘܢ ܢܗܘܐ ܐܒܘܢ When I use sort and uniq, the result ...
2
votes
3answers
1k views

How to determine the character encoding that a terminal uses in a C/C++ program?

I've noticed that SyncTERM uses a different character encoding than the default MacOS terminal emulator, and they're incompatible with one another. For example, say you want to print a block ...
27
votes
2answers
11k 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 ...
4
votes
2answers
192 views

Besides the non-C locale, what else is messing up my sort?

I'm using Ubuntu 16.04_xfce xenial. This more than setting the correct locale, or using "natural order" sort operands. I sorted the apt sources file. All lines start with "#", "##", or "deb". I ...
3
votes
2answers
1k views

Chromium browser does not allow setting the default paper size for “Print to File”

In Chromium, as in other web browsers, there is a Print function, which includes printing to physical printers, as well as a "Print to File" function. The default paper size for the physical printers ...
1
vote
2answers
583 views

Konsole displays ?? instead of ↑ and ↓ in midnight commander

In midnight commander, changing the appearance via menu, selecting the skin sand256.ini etc. on many Linux setups gives nice colors. After reversing the sort order of file listing, ideally this is ...
5
votes
1answer
5k views

Consequences of setting up POSIX locales

We are using several Ubuntu servers having English as working language; however having en_US locale set in machines we encounter problems with apt-cacher-ng downloading translation files. One solution ...
3
votes
1answer
58 views

Create a new locale on FreeBSD

I'd like to create a new locale on FreeBSD. I thought that I can just copy one of the existing ones in /usr/share/locale but apparently it is not so simple. Firstly, I just create a copy of the en_US....
3
votes
1answer
368 views

How do locale settings work in a process?

I am trying to understand how locale works in Linux. This is how I think it works: Each process have an environment variables table, you can launch a process and set some environment variables for ...
3
votes
1answer
2k views

How to find system language within Python?

Is there any way, in Python 3, to find out the language used by the system? Even a tricky one though, like: reading from a file in a sneaky directory, and finding the string 'ENG' or 'FRE' within the ...
1
vote
1answer
53 views

Example for $“…”

As I was searching for an answer regarding what is $"..." , I came across this answer The answer although tells what's $"..." but does not clarify with an example, it mentions about locale but I didn'...
1
vote
1answer
405 views

How do I get the language for messages?

Is there a single command I can use to get the language to use for messages or do I have to check LC_MESSAGES, LC_ALL, LANG etc. in some specific order?