I have lots of files encoded in CP1254 (Windows-1254 ANSI/ISO Turkish). When I double click such a file, I want Notepad++ to display them correctly. However, Notepad++ selects the default encoding of (so-called) ANSI which something like ISO 8859-1. I know how to immediately select the correct encoding from Encoding → Character sets → Turkish → Windows-1254. However, I want this to happen automatically.
I haven't found a setting in Notepad++ Preferences... that will set the default encoding for opening files. Disabling or enabling the Autodetect character encoding setting under MISC.. seems to have no effect. The Encoding setting for New Document is not something I am searching for, because I am not creating a new file, I am just opening an old file.
I am running Notepad++ under Wine on an Ubuntu 24.04 system and I do not know a method on how to change the default encoding of Wine. Also, I have tried to prepend the wine
command with LC_ALL=en_US.CP1254
and all kind of variations (LANG
, LANGUAGE
, etc.) with no change.
I managed to solve my problem by using a line like this in the .desktop
file:
Exec=env LC_ALL=tr_TR.CP1254 /usr/bin/wine /path/to/npp/notepad++.exe %u
However, I am still curious why en_US.CP1254
does not work.