It’s interesting how bugs can lead to a deeper understanding of how computer systems work.  It’s also amazing how nuanced some technical topics ca

Adventures in collating text in Linux, Docker and Postgres

submited by
Style Pass
2022-05-16 11:30:04

It’s interesting how bugs can lead to a deeper understanding of how computer systems work. It’s also amazing how nuanced some technical topics can be. For instance, one would think that sorting text should have the same behaviour in any English-like locale, right? Wrong. Join me on a dive down a rabbit hole that I had at work a while ago.

A weird problem turned up in one of our projects: the test suite was passing on my local dev box and on our Jenkins instance, but not within a Docker container running on our GitLab-CI system1.

After first having thought “Err, what??”, somewhere at the back of my brain I had another thought: “Hrm, I’ve seen something like this before”. I find this happens quite often now. Perhaps this is one of the few advantages to getting older: there’s much more experience to draw from when debugging.

So, I was fairly sure that the problem looked like a collation issue (i.e. the sorting order of text and something that is often related to the locale).

Leave a Comment