michaellukashov / Far-NetBox

SFTP/SCP/FTP/FTPS/WebDAV/S3 client for Far Manager 3 (http://farmanager.com/)
https://forum.farmanager.com/viewtopic.php?t=6317
GNU General Public License v2.0
155 stars 52 forks source link

Fix writing code page to database #484

Closed ssvine closed 2 weeks ago

ssvine commented 2 weeks ago

There is a problem with storing the session setting Charset encoding for filenames to the settings database.

Steps to reproduce:

  1. Press F4 on some session in the session list
  2. Edit Charset encoding for filenames: change to 1251
  3. Save session, exit Far, start Far
  4. Check Charset encoding for filenames, it should be equal to 1251
  5. Change Charset encoding for filenames: select the first element from the drop-down menu (65001 (UTF-8))
  6. Save session, exit Far, start Far
  7. Check Charset encoding for filenames again: it is set to 1251 instead of 65001 (UTF-8)

This pull request fixes the problem. It just prevents setting empty code page (aka default value). This way, the correct value will be written to the database later.