Languages sorted by first string with BOM

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Languages sorted by first string with BOM

Post by *Usher »

It's time to other Unicode Oddities.

1. Convert a few LNG files to UTF-8 using Notepad and add them to LANGUAGE subdirectory.
Don't forget to change the second line in every converted file from
codepage=<some windows CP number>
to

Code: Select all

codepage=65001
You can also add UTF-8 to the end of the first line of every converted file to easy find them later.

2. Open options and see the list of languages. The result depends on Windows version you are using.
* In Windows XP languages are sorted in the proper alphabetical order.
* In any newer Windows files saved as UTF-8 with BOM are sorted on the top, before other languages.
* In newest Windows 10 builds and in Windows 11 Notepad by default save files as UTF-8 without BOM and languages should be again sorted in the proper alphabetical order.

Unicode Control to Commander Chris...
Andrzej P. Wozniak
Polish subforum moderator
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Languages sorted by first string with BOM

Post by *ghisler(Author) »

Unicode language files must NOT have a BOM. Those with BOM are not officially supported.
Author of Total Commander
https://www.ghisler.com
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Languages sorted by first string with BOM

Post by *Usher »

2ghisler(Author)
But LNG files in UTF-8 with BOM are properly sorted in Windows XP and they are created by default in all Windows system except for some newest builds. What is more, I cannot find any mention about that fact in TC Help and in difres texts.
I think it's time to gather all Unicode quirks and oddities in one place.
Andrzej P. Wozniak
Polish subforum moderator
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Languages sorted by first string with BOM

Post by *Dalai »

Usher wrote: 2022-06-26, 16:30 UTC[...] and they are created by default in all Windows system except for some newest builds.
Huh? I think it's the other way around. Only newer releases of Windows 10 (and probably 11) default to UTF-8 in Notepad. But Notepad is only one editor (or a concept study of one as I like to call it). Sure, it comes with Windows. Notepad on older versions of Windows can save files in UTF-8 but it's not the default encoding.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Languages sorted by first string with BOM

Post by *Usher »

2Dalai
It's misunderstanding. I mean that only newest Notepad versions can save files as UTF-8 WITHOUT BOM. WITHOUT is the key.
Andrzej P. Wozniak
Polish subforum moderator
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Languages sorted by first string with BOM

Post by *Dalai »

2Usher
I see. Didn't go as far as to check if the files are saved with or without BOM.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Languages sorted by first string with BOM

Post by *ghisler(Author) »

Moderator message

Moved to "will not be changed"
Author of Total Commander
https://www.ghisler.com
Post Reply