Windows-1251 character set

Alexander Javoronkov Alexander.Javoronkov at vm.ru
Mon Mar 6 12:03:36 GMT 2000


I've got Win'98 with Russian (windows-1251) locale & samba-2.0.6 with
"client code page = 866".
I want to store russian filenames on my Samba server in windows-1251
character set.
I've browsed through smb.conf.5 and saw that there's a keyword
"character set = ..." that rules over charsets that are used to convert
between DOS and standard UNIX codepages. Furthermore, I've noticed
lib/charcnv.c file that is definitely used for this purpose.

/* Init for russian language (koi8) */

static void init_koi8_r(void)
{
  if (!mapsinited) initmaps();

  /* There aren't undefined characters between 128 and 255 */

/* MSDOS Code Page 866 -> KOI8-R */
update_map("\200\304\201\263\202\332\203\277\204\300\205\331\206\303\207\264");

and so on, and on, and on ;)

Seems like I should add support for "character set = windows-1251" the
same way, but... I have no clues about what numbers to put in update_map
for cp866->win1251 translation.

Can anybody help ?

Sorry if this is the wrong place for such questions.


More information about the samba-technical mailing list