# Codepage UTF8



## StainlessRat (Nov 14, 2015)

```
FreeBSD gate 10.2-RELEASE-p7 FreeBSD 10.2-RELEASE-p7 #0 r290676: Fri Nov 13 22:08:33 MSK 2015  root@gate:/usr/obj/data/src/sys/KERNEL0  amd64
```

I want mount the share of the windows.
`[root@gate /etc]# df -h`

```
Filesystem  Size  Used  Avail Capacity  Mounted on
/dev/da0p2  18G  5,2G  12G  31%  /
devfs  1,0K  1,0K  0B  100%  /dev
//AMANDA@NEMO-PC/SHARA  687G  460G  228G  67%  /mnt
```
When I run the command `ls -l /mnt` I see:

```
???????-??????????? ??ન ? ???????. ???.doc
??? ???????? ????? ?? ??????????????? ??饭?? ? ????? ???.doc
?????????
???????? ????㤮????? ??? ??ન.doc
??????
???????
????.doc
?????????.doc
????? 4 ???娩.doc
????? ???娩.doc
??? ??????.doc
??? ⥪??? ?? ?????? ???? ????? ?? ??????? ?????? ? ??????? ?????????????.doc
?
?? ??? ????.doc
?ન? ??????.doc
```
Which codepage enable? (these are Russian letters)

nsmb.conf:​

```
[default]
  workgroup=WORKGROUP
[NEMO-PC]
  addr=192.168.1.3
[NEMO-PC:AMANDA]
  password=pass:)
```


fstab:

```
//AMANDA@NEMO-PC/SHARA   /mnt   smbfs   ro   0   0
```


----------



## SirDice (Nov 17, 2015)

Have a look in the handbook: Chapter 22. Localization - i18n/L10n Usage and Setup

And keep in mind that the sc(4) console doesn't support UTF-8 so it may not look correct even if you set things correctly. 

https://wiki.freebsd.org/Newcons


----------



## StainlessRat (Nov 18, 2015)

Sorry, additional infomation...
I'm use vt(4)
/boot/loader.conf

```
kern.vty=vt
```
/etc/login.conf

```
russian|Russian Users Accounts:\
  :charset=UTF-8:\
  :lang=ru_RU.UTF-8:\
  :tc=default:
```
/etc/master.passwd

```
root:****:0:0:russian:0:0:Charlie &:/root:/usr/local/bin/bash
```
`locale`

```
LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_ALL=
```


----------



## StainlessRat (Nov 19, 2015)

fstab

```
//AMANDA@NEMO-PC/SHARA /mnt smbfs ro,-E=utf8:cp866 0 0
```
`ls -l /mnt`

```
drwxr-xr-x  1 root  wheel  16384 19 ноя 13:27 Новая папка
drwxr-xr-x  1 root  wheel  16384 19 ноя 13:27 Старая папка
```


----------



## HenryHu (Jan 8, 2017)

I've tried different methods in all those threads, and none of them worked. Finally, the setting "charsets=UTF-8:UTF-8" in /etc/nsmb.conf works. It equals to -E=UTF-8:UTF-8. I think that this should be the default.


----------

