Page 1 of 1

[2.0.22] Nauvis train station names not alphabetical on Linux

Posted: Wed Nov 27, 2024 7:04 pm
by zombiegreedo
The list of stations that appears when I click "add station" on the train schedule interface screen is sorted alphabetically on Windows but not on Linux (Ubuntu 22.04).

Here is a screenshot of the station list in Linux which you can see is not sorted alphabetically:
Linux screenshot
Linux screenshot
fact_lin.png (120.87 KiB) Viewed 183 times

I did not notice the issue until I had many train stations on Nauvis, currently there are 85. I believe I placed them all "normally," building them by hand one-at-a-time at first then tearing them down and rebuilding from blueprints once I had bots, keeping some default names at first but then renaming them all later on.

I am unable to recreate the issue on Gleba with only three stations, they are listed alphabetically no matter how I rename or rearrange the stations. So, it appears to be specific to my base on Nauvis or something about the complexity or number of stations.

If I change a station name, it rearranges the list in strange ways. Here I renamed "Artillery pickup," which should be at the top of the list but is in the middle, to "Zartillery pickup," which should move it to the end of the list, but it stays at about the same place in the list and other names in the list move around. In this second screenshot the "gears" and "plastic" stops have appeared but they weren't visible in the previous screenshot. When I change the name back to "Artillery" the other names on the list also move back.
Linux screenshot renamed
Linux screenshot renamed
fact_linz.png (58.38 KiB) Viewed 183 times

Here is a screenshot of the same list in Windows which is sorted alphabetically:
Windows screenshot
Windows screenshot
fact_winds.png (51.52 KiB) Viewed 183 times

Save file is here: https://drive.google.com/file/d/1JvSW7m ... sp=sharing

The attached log file is from 2.0.21 but I confirmed the issue is still present in 2.0.22.

Re: [2.0.22] Nauvis train station names not alphabetical on Linux

Posted: Thu Nov 28, 2024 4:23 pm
by eugenekay
What is the Value of your “LC_ALL” environmental variable? This affects the order used for some programs (eg, ignoring whitespace and other characters).

In bash, run

Code: Select all

echo $LC_ALL

Re: [2.0.22] Nauvis train station names not alphabetical on Linux

Posted: Fri Nov 29, 2024 1:43 am
by jyasutin
I just noticed the same issue for the first time on my save after returning to Nauvis and working on the rail network again. Everything was sorted properly when I was last here but is not sorted in 2.0.21. Notice in my case the list is sorted in *reverse* except for "DEPOT" and "LD U". The mis-ordering is consistently the same across processes and saves that have the same station names. I can't help but notice "DEPOT", which should be first, is dead middle in the list -- what sort algorithm are you using?

I'm still on 2.0.21, screenshot attached, locale output below (LC_COLLATE is set to C). The problem also appears in older saves (2+ weeks ago) where I am fairly certain the order was correct in the older releases.
20241128171916_1.jpg
20241128171916_1.jpg (678.34 KiB) Viewed 97 times

Code: Select all

% locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Re: [2.0.22] Nauvis train station names not alphabetical on Linux

Posted: Fri Nov 29, 2024 1:49 am
by jyasutin
Also for me the issue is specific to the "Add station" dialog. "Change stop name" (accessed via the pencil icon in "Train stop" or via the "Station is (not) full" wait conditions) is sorted correctly per my locale settings.

Re: [2.0.22] Nauvis train station names not alphabetical on Linux

Posted: Fri Nov 29, 2024 3:25 am
by zombiegreedo
eugenekay wrote: Thu Nov 28, 2024 4:23 pm What is the Value of your “LC_ALL” environmental variable? This affects the order used for some programs (eg, ignoring whitespace and other characters).

In bash, run

Code: Select all

echo $LC_ALL
LC_ALL does not seem to be set. Here are other locale settings if they are helpful.

Code: Select all

LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
jyasutin wrote: Fri Nov 29, 2024 1:49 am Also for me the issue is specific to the "Add station" dialog. "Change stop name" (accessed via the pencil icon in "Train stop" or via the "Station is (not) full" wait conditions) is sorted correctly per my locale settings.
I confirm this as well.