What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Locales support?

Alek

Occasional Visitor
What is the best way to go about adding locales to Asuswrt-Merlin? The only Entware packages seem to be for CUPS or Perl.

I tried exporting $LANG in profile.add to en_US.UTF8 without success. ($LANG returns as it should, but that doesn't change anything. I'm assuming there's something locales maintains or generates that I am missing.)

Apologies if this is really simple stuff, I'm new to embedded Linux.

I'm trying to get samba and lftp to support Hungarian characters so that I can have my automated sync work correctly and access it via LAN.
 
locales are not built in.
You can set the locale in bash and it will return your setting when entering 'echo $LANG' but the fixed and only locale is EN.
 
Hmm. Well I installed bash and set the locale there. I think that might have helped the LFTP side of things but when I SSH in and LS, what should return as 'Béla Bartók' returns 'Be'.

Samba will share the folder 'Béla Bartók' but nothing inside it. I did notice that the unix charset in smb.conf is entered as UTF8 when version 3 of samba asks for UTF-8, though I doubt that's the culprit.

Oh well, at least I have bash history, so thanks for that. I will keep trying to figure this out.

EDIT: This might be an OSX problem. Tested samba shares on Win 8.1 and everything is as it should be. Will try installing Samba on OSX via Homebrew or from scratch and if that fixes it I'll confirm here.
 
Last edited:
I can confirm that a folder 'Béla Bartók' is shown (altough dis- and re-appiering for some reason) but not its contents on OSX.
This is from a smb share on a QNAP NAS.
Will be interesting what you come up with!
 
You could test it in a small php script. You can see there i.e. whether some long format date shows proper month name or only English one. If there is no locale support you have to compile your own firmware with proper language support preset of the core. I did it same way. What code page do you need? Are you sure only unicode?
 
I can confirm that a folder 'Béla Bartók' is shown (altough dis- and re-appiering for some reason) but not its contents on OSX.

Yes, I get the same appearing and disappearing behaviour as well. Only on the Samba share though, connect via NFS and everything is fine.

Thought it might be OSX's non-standard/extended implementation of UTF-8 but now I'm not so sure. Perhaps it's Apple's SMBFS? Maybe, if I can be bothered, I might try mounting with SMBNetFS via OSXFUSE … but I'll probably just use NFS on OSX and leave Samba for Windows.
 
You could test it in a small php script. You can see there i.e. whether some long format date shows proper month name or only English one. If there is no locale support you have to compile your own firmware with proper language support preset of the core. I did it same way. What code page do you need? Are you sure only unicode?

Yes just unicode but turns out the firmware is fine, it's an Apple bug.
 
try a testparm on the command line of the samba server (testparm validates the smb.conf and shows what the share should look like to smb clients).

On your Mac - try mounting the share via CIFS vs. SMB...

Apple has removed the Samba Server/Client from OSX 10.7 and later due to GPL concerns and implemented their own CIFS stack for server and client - it works well, but try CIFS vs. SMB for the mount as I suggest above.

sfx
 
@oldgringo
Yeah, that's where I saw it recommended to use UTF-8 with Samba 3 instead of UTF8, which is what it is by default on my N66U running Merlin FW. I'm supposing I'd have to write a regex script to change that though given that smb.conf is dynamically generated. (And it probably makes no difference.)

There's also this:
Although Mac OS X uses UTF-8 as its encoding method for filenames, it uses an extended UTF-8 specification that Samba cannot handle, so UTF-8 locale is not available for Mac OS X.

@sfx2000
Yes, I tried mounting via CIFS instead of SMB but had the same behaviour. Using CIFS should use SMB1 instead of Apple's buggy SMB2, however they both use the same smbfs filesystem.

Oh, and I couldn't find testparm on Merlin. Tried installing samba36-server via opkg but that didn't have testparm either.

I'll probably build myself a NAS or buy a small Synology unit in the coming months so that I have more control over these things. Speeds are also pretty slow with the N66U CPU and USB2.
 
@oldgringo
Yeah, that's where I saw it recommended to use UTF-8 with Samba 3 instead of UTF8, which is what it is by default on my N66U running Merlin FW. I'm supposing I'd have to write a regex script to change that though given that smb.conf is dynamically generated. (And it probably makes no difference.)

Use a Postconf script for manipulating config files. I doubt this would make any difference indeed, unless there's actually a syntax error in the config file.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top