Last modified 7 years ago Last modified on 01/19/10 06:49:55

Select charsets

If you want to select chansets, you need to make project with --enable-charset option. Select charsets works in file panels, editor and viewer.

List of charsets plased in /etc/mc/mc.charsets file. Format of file is a simple: any string must contain:

<Name of charset> <description of charset>

'Name of charset' must be named by one of iconv -l output charsets names. 'Description of charset' -- string for display charset into 'select charsets' dialog window. 'Name of charset' and 'Description of charset' must be separated by space or tab symbol.

Default mc.charsets file contain:

ASCII           7-bit ASCII
ISO-8859-1      ISO 8859-1
ISO-8859-2      ISO 8859-2
ISO-8859-5      ISO 8859-5
CP1250          Windows 1250
CP1251          Windows 1251
CP437           CP 437
CP850           CP 850
CP852           CP 852
CP866           CP 866
KOI8-R          KOI8-R
KOI8-U          KOI8-U
UTF-8           UTF-8

You may edit this list as you need. Currently, all 8=bit charsets are supported. Only UTF-8 is supported among multibyte charsets. If you mean, that some charsets need to include into default file (in project repository) please keep ticket in our bugtracker.

Display setup

As first, you need to setup charset of input/output (must be equal to your system charset). Setting is made in the 'Display bits' dialog window (Menu -> Options -> Display bits ...). When you save the settings the encoding will be recorded in the configuration file ~/.mc/ini (option 'display_codepage' in section [Misc]).

In editor and viewer

For change charset press Alt-e (or select Menu -> Command -> Encoding...).This means that the file will be recoded from selected charset into input/output charset. File still untouched.

Search also be produced in the charset that you chose. You can choose "All charsets" in the search dialog to search in all known charsets.

If you save the settings of editor, then the chosen charset will written in the configuration file ~/.mc/ini ('source_codepage parameter' in the [Misc] section). In next time of editor start saved charset will be used for all reopening files.

In file panels

Press Alt-e in active panel (or select 'Menu -> <Left|Right> -> Encoding...'. Select needed charset. In title of panel you'll see:

/some/path#enc:<selected charset>

You may continue to navigate into subdirs. Named of files and directoryes will be recoded from selected charset into input/output charset. You may change charset into subdir:

/some/path#enc:<selected charset>/subdir#enc:<selected charset 2>

In any case recode of filenames will be made from last selected charset into input/output charset (not between charsets in path).

If you select 'No translation' in 'Choose codepage' dialog window, all charset recode info will be cleaned from path.