id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
2282	force utf option	zyxmon		"I have arm based nas (synology ds110j), that does not support locales but stores files in uft-8.
The sample program

{{{
#include <langinfo.h>
#include <locale.h>
#include <stdio.h>

int
main (int argc, char *argv[])
{
    setlocale (LC_ALL, """");
    printf (""%s\n"", nl_langinfo (CODESET));
    return 0;
}
}}}
always returns ANSI_X3.4-1968

To make mc correctly work with utf-8 on this system I've made changes in 2 files:
1) In lib/strutil/strutil.c  
I've changed 

{{{
return (nl_langinfo (CODESET));
}}}
to

{{{
return ""UTF8"";
}}}

2) In lib\tty\tty-slang.c
I've changed

{{{
SLutf8_enable (-1); 
}}}
to
{{{
SLutf8_enable (1); 
}}}

These changes force utf-8 support in mc on my system.
I think these changes can be made an option in future releases in mc for such systems.

PS Many thanks to '''il.smind''', who helped my to find this solution.



"	enhancement	reopened	trivial	Future Releases	mc-tty	master						no branch	
