0

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.

1
  • locate -a gives you all installed locales, but that locales are just for Linux/Ubuntu side. Inside wine you should check the windows/wine settings. Autodetection is very difficult cp1252 and cp1254 are very similar, so or you specify explicitly a locale or notepad++ uses windows "culture" setting Commented Jun 19 at 6:23

1 Answer 1

0

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.