cp936 charater set not working with Teddy_bear build 44


bmx888

Network Guru
Member
I just upgraded to Tomato Firmware v1.27.8743 ND USB Ext.
It seems that the double character set is still not solved. I run the test
• Run lsmod. See if nls_cp936 shows up in the output.
Here is in my list
Tainted: P
nls_cp936 119840 0 (unused)
ipt_ipp2p 7320 2
printer 12892 0


• Run cat /etc/smb.conf. See if "client code page = 936" is present in the [global] section, as well as "coding system = utf8" line.
I found in my global section.

coding system = utf8
client code page = 936

• Run ls -lFA /usr/share/ command. Verify that codepage.936 and unicode_map.936 show up in the output as valid symlinks.
Here is my list:


lrwxrwxrwx 1 root root 27 Dec 31 1969 codepage.437 -> /usr/codepages/codepage.437*
lrwxrwxrwx 1 root root 27 Dec 31 1969 codepage.850 -> /usr/codepages/codepage.850*
lrwxrwxrwx 1 root root 27 Dec 31 1969 codepage.852 -> /usr/codepages/codepage.852*
lrwxrwxrwx 1 root root 27 Dec 31 1969 codepage.866 -> /usr/codepages/codepage.866*
lrwxrwxrwx 1 root root 29 Dec 31 1969 codepage.936 -> /mnt/MOVIE/cp936/codepage.936*
lrwxrwxrwx 1 root root 30 Dec 31 1969 unicode_map.437 -> /usr/codepages/unicode_map.437*
lrwxrwxrwx 1 root root 30 Dec 31 1969 unicode_map.850 -> /usr/codepages/unicode_map.850*
lrwxrwxrwx 1 root root 30 Dec 31 1969 unicode_map.852 -> /usr/codepages/unicode_map.852*
lrwxrwxrwx 1 root root 30 Dec 31 1969 unicode_map.866 -> /usr/codepages/unicode_map.866*
lrwxrwxrwx 1 root root 32 Dec 31 1969 unicode_map.936 -> /mnt/MOVIE/cp936/unicode_map.936*

It seems all ok in config. But I still can not see any double character file or folder.

I will downgrade to 41 a little later. Please let me know if you need to run any tests.
Thanks Teddy bear.
 
It seems that the double character set is still not solved.
Did you download the new version of samba_extra_codepages package? The new recompiled nls kernel modules are needed as well, the issue was not only in the firmware itself.
 
Did you download the new version of samba_extra_codepages package? The new recompiled nls kernel modules are needed as well, the issue was not only in the firmware itself.

I did download the latest samba_extra_codepages. But still not working.
 
bmx888,
The old package is still there - go to the "Rotten" subfolder.

As for why it's not working for you in v42 - try one additional thing. After saving your Samba settings, and with your drive disconnected, execute the following command:
Code:
nvram set smbd_cpage=936
nvram commit
Then plug in your drive, and see if it's any better...
 
bmx888,
The old package is still there - go to the "Rotten" subfolder.

As for why it's not working for you in v42 - try one additional thing. After saving your Samba settings, and with your drive disconnected, execute the following command:
Code:
nvram set smbd_cpage=936
nvram commit
Then plug in your drive, and see if it's any better...

I just did what you told twice. restart the router and hard drive, it magically worked.
You rock, man.
 
bmx888,
The old package is still there - go to the "Rotten" subfolder.

As for why it's not working for you in v42 - try one additional thing. After saving your Samba settings, and with your drive disconnected, execute the following command:
Code:
nvram set smbd_cpage=936
nvram commit
Then plug in your drive, and see if it's any better...

Teddy_bear, I still have problem with codepage 936.
I did disconnect hard drive and run the
nvram set smbd_cpage=936
nvram commit
then reconnect after the hard drive.
still no go on the double character folder. I restarted router too.
is there any other test I should run?
 
Hi, teddy_bear,
I just upgraded to v44.
It seems that it is still not working with cp936 charater set.
You can copy the filename(测试.txt) on your share drive to make sure it is working.




Here is my "run after mounting scrips:
ln -s /mnt/MOVIE/cp936/codepage.936 /usr/share/codepage.936
ln -s /mnt/MOVIE/cp936/unicode_map.936 /usr/share/unicode_map.936
insmod /mnt/MOVIE/cp936/nls_cp936.o
insmod /mnt/MOVIE/cp936/nls_gb2312.o
service samba restart

I run these debug code and here are the results
1..lsmod
printer 12892 0 (unused)
nls_cp936 119776 0 (unused)
2..cat /etc/smb.conf
coding system = utf8
client code page=936
3. ls -lFA /usr/share/
[root$]
path = /
browseable = no
comment = Hidden Root

[share]
path = /mnt
writable = yes
force user = root
comment = Default Share

[ELEMENTS]
path = /tmp/mnt/ELEMENTS
comment = ELEMENTS
writable = yes
force user = root
lrwxrwxrwx 1 root root 27 Dec 31 1969 codepage.437 -> /usr/codepages/codepage.437*
lrwxrwxrwx 1 root root 27 Dec 31 1969 codepage.850 -> /usr/codepages/codepage.850*
lrwxrwxrwx 1 root root 27 Dec 31 1969 codepage.852 -> /usr/codepages/codepage.852*
lrwxrwxrwx 1 root root 27 Dec 31 1969 codepage.866 -> /usr/codepages/codepage.866*
lrwxrwxrwx 1 root root 32 Feb 17 10:54 codepage.936 -> /mnt/Elements/cp936/codepage.936@
lrwxrwxrwx 1 root root 30 Dec 31 1969 unicode_map.437 -> /usr/codepages/unicode_map.437*
lrwxrwxrwx 1 root root 30 Dec 31 1969 unicode_map.850 -> /usr/codepages/unicode_map.850*
lrwxrwxrwx 1 root root 30 Dec 31 1969 unicode_map.852 -> /usr/codepages/unicode_map.852*
lrwxrwxrwx 1 root root 30 Dec 31 1969 unicode_map.866 -> /usr/codepages/unicode_map.866*
lrwxrwxrwx 1 root root 35 Feb 17 10:54 unicode_map.936 -> /mnt/Elements/cp936/unicode_map.936@

The only thing weird is the /mnt/Elements/cp936/unicode_map.936@
and /mnt/Elements/cp936/codepage.936@
Why is there a @ sign after the codepage?
 
bmx888,
Since it worked for you at least once with v43, based on your previous post, it means that all files are there and they are all correct versions (just make sure when you upgrade to v44 to download extra modules again - I rebuilt the toolchain, and you may need new versions). So it's only a matter of configuration, and the correct order in which things should be done.

Try to experiment with loading everything and starting all services manually in the telnet session to find out what steps are missing if any, or if firmware is doing anything to prevent it from working...

Also, it seems that rzerzuch is using cp936 - maybe check with him:
Feb 17 00:43:49 unknown user.warn kernel: MSDOS FS: IO charset utf8
Feb 17 00:43:49 unknown user.warn kernel: MSDOS FS: Using codepage 936
Feb 17 00:43:49 unknown user.warn kernel: FAT: freeing iocharset=utf8
By the way, if you don't see these messages in the log when your FAT drives are getting mounted, it means something is not right.

Unfortunately I don't have enough time to investigate this issue thoroughly (and it's not a high priority as this is not a part of the firmware), and can't even test it myself - the Chinese is not in the list of languages I can install in Windows - probably the special Chinese version of Windows is needed. But I will let you know for sure if and when I figure anything out.
 

Back
Top