has ANYONE used FreeBSD read Chinese directories from a Windows Share? (was: Re: (repost) cannot read windows share)

2006-12-09 Thread 张韡武
If our understanding to the current problem is correct (that FreeBSD
kernel iconv currently have problem with double-bit character-set), then
there should have never been FreeBSD users that can actually mount and
access a Windows Share that:
 I. is using GB2312 locale (that is, Windows Simplified Chinese
version);
II. have Chinese character in folder names

在 2006-12-05二的 17:36 +1100,Antony Mawer写道:
 On 5/12/2006 5:28 PM, 张韡武 wrote:
  在 2006-12-04一的 21:54 -0800,Garrett Cooper写道:
 Also, I'm not sure if FreeBSD has been configured to run the particular 
  character set you need (nor am I sure where any documentation may be 
  regarding how to set that up), but you also want to explore getting that 
  solved in tandem with the mount_smbfs item.
  
  I read carefully with mount_smbfs and as far as I can tell mount_smbfs
  is using iconv lib which compiled as kernel module. After I run
  mount_smbfs I checked and made sure libiconv.ko is automatically loaded.
  According to documents, mount_smbfs automatically load this kernel
 ...
 
 I don't know if this is at all useful, but I have come across the 
 following patches, which appear to have been ported from Darwin, to 
 improve handling of multibyte character sets:
 
  http://people.freebsd.org/~imura/kiconv/
 
 It would be interesting to see these committed (if they are valuable), 
 as I know there are issues with FreeBSD mount_smbfs when operating 
 against the Mac OSX samba implementation, which (I am told) only speaks 
 UCS2.
 
 Given the work already gone into these, it would be nice to see them 
 finished off and committed... I wonder how many other smbfs-related 
 improvements may exist in Darwin that might be worth looking at?
 
  http://www.opensource.apple.com/darwinsource/10.4.8.x86/smb-217.18/
 
 Cheers
 Antony

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


(repost) cannot read windows share

2006-12-04 Thread 张韡武
This is a re-post, I am getting desperate because my work
require me to connect to this share and my colleague can mount
the share on Debian. I will have to move to install Debian if I
wish to go on working... But I am already used to my BSD. It's
too strange to move to another OS for such a tiny problem! Could
what I mention below be a bug of FreeBSD mount_smbfs?

Using FreeBSD 6.1, I can mount a windows share but the Chinese
characters in folder and file names look junk text to me. Charset
conversion (-E parameter of mount_smbfs) do not work at all. If I do
ls(1) to a directory that has Chinese character in its name, the process
'ls' will take about 80% CPU resource and hang there forever. Ctrl+C
cannot stop it (kill -KILL can). If I run other command that read any
file in the directory that has Chinese character in its name, that
application hangs there taking about 80% CPU resource too.

This process is better illustrated with this screenshot:
gopher://sdf.lonestar.org/I/users/weiwu/mount_chinese_smbshare.png

In the screenshot, I do have mounted the share with -E parameter which
should convert GB18030 folder names to UTF-8 but 
actually no conversion is done (see the ls | iconv which shows what it
should be looking like if the conversion is done)

Actually I have never successfully done charset conversion with
mount_smbfs, what did I do wrong?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: (repost) cannot read windows share

2006-12-04 Thread Lane
On Monday 04 December 2006 19:34, 张韡武 wrote:
 This is a re-post, I am getting desperate because my work
 require me to connect to this share and my colleague can mount
 the share on Debian. I will have to move to install Debian if I
 wish to go on working... But I am already used to my BSD. It's
 too strange to move to another OS for such a tiny problem! Could
 what I mention below be a bug of FreeBSD mount_smbfs?

 Using FreeBSD 6.1, I can mount a windows share but the Chinese
 characters in folder and file names look junk text to me. Charset
 conversion (-E parameter of mount_smbfs) do not work at all. If I do
 ls(1) to a directory that has Chinese character in its name, the process
 'ls' will take about 80% CPU resource and hang there forever. Ctrl+C
 cannot stop it (kill -KILL can). If I run other command that read any
 file in the directory that has Chinese character in its name, that
 application hangs there taking about 80% CPU resource too.

 This process is better illustrated with this screenshot:
 gopher://sdf.lonestar.org/I/users/weiwu/mount_chinese_smbshare.png

 In the screenshot, I do have mounted the share with -E parameter which
 should convert GB18030 folder names to UTF-8 but
 actually no conversion is done (see the ls | iconv which shows what it
 should be looking like if the conversion is done)

 Actually I have never successfully done charset conversion with
 mount_smbfs, what did I do wrong?

weiwu,

One thing comes to mind:  Try your question here:

http://us1.samba.org/samba/docs/FAQ/

and here:

http://us1.samba.org/samba/docs/man/Samba-HOWTO-Collection/

and here:

http://us1.samba.org/samba/archives.html

and here:

https://lists.samba.org/mailman/

Your question is specific to samba, and probably not related to 
FreeBSD-specific issues.

lane
P.S.  I note that the hosts in the links above are mostly us1.  That's 
probably something to do with the language specification on my system, but 
may be different for you.  Check out www.samba.org for better links.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: (repost) cannot read windows share

2006-12-04 Thread Garrett Cooper

Lane wrote:

On Monday 04 December 2006 19:34, 张韡武 wrote:

This is a re-post, I am getting desperate because my work
require me to connect to this share and my colleague can mount
the share on Debian. I will have to move to install Debian if I
wish to go on working... But I am already used to my BSD. It's
too strange to move to another OS for such a tiny problem! Could
what I mention below be a bug of FreeBSD mount_smbfs?

Using FreeBSD 6.1, I can mount a windows share but the Chinese
characters in folder and file names look junk text to me. Charset
conversion (-E parameter of mount_smbfs) do not work at all. If I do
ls(1) to a directory that has Chinese character in its name, the process
'ls' will take about 80% CPU resource and hang there forever. Ctrl+C
cannot stop it (kill -KILL can). If I run other command that read any
file in the directory that has Chinese character in its name, that
application hangs there taking about 80% CPU resource too.

This process is better illustrated with this screenshot:
gopher://sdf.lonestar.org/I/users/weiwu/mount_chinese_smbshare.png

In the screenshot, I do have mounted the share with -E parameter which
should convert GB18030 folder names to UTF-8 but
actually no conversion is done (see the ls | iconv which shows what it
should be looking like if the conversion is done)

Actually I have never successfully done charset conversion with
mount_smbfs, what did I do wrong?


weiwu,

One thing comes to mind:  Try your question here:

http://us1.samba.org/samba/docs/FAQ/

and here:

http://us1.samba.org/samba/docs/man/Samba-HOWTO-Collection/

and here:

http://us1.samba.org/samba/archives.html

and here:

https://lists.samba.org/mailman/

Your question is specific to samba, and probably not related to 
FreeBSD-specific issues.


lane
P.S.  I note that the hosts in the links above are mostly us1.  That's 
probably something to do with the language specification on my system, but 
may be different for you.  Check out www.samba.org for better links.


	Your issue has to deal with locales and character sets. I think what 
you want to do is look into mount(8) and mount_smbfs(8), if you use 
fstab to specify mounts for the SMB share instead of smbmount.


A flag that sort of jumped out at me in mount_smbfs(8) was...

 -E cs1:cs2
 Specifies local (cs1) and server's (cs2) character sets.

Cheers,
-Garrett
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: (repost) cannot read windows share

2006-12-04 Thread Garrett Cooper

Garrett Cooper wrote:

Lane wrote:

On Monday 04 December 2006 19:34, 张韡武 wrote:

This is a re-post, I am getting desperate because my work
require me to connect to this share and my colleague can mount
the share on Debian. I will have to move to install Debian if I
wish to go on working... But I am already used to my BSD. It's
too strange to move to another OS for such a tiny problem! Could
what I mention below be a bug of FreeBSD mount_smbfs?

Using FreeBSD 6.1, I can mount a windows share but the Chinese
characters in folder and file names look junk text to me. Charset
conversion (-E parameter of mount_smbfs) do not work at all. If I do
ls(1) to a directory that has Chinese character in its name, the process
'ls' will take about 80% CPU resource and hang there forever. Ctrl+C
cannot stop it (kill -KILL can). If I run other command that read any
file in the directory that has Chinese character in its name, that
application hangs there taking about 80% CPU resource too.

This process is better illustrated with this screenshot:
gopher://sdf.lonestar.org/I/users/weiwu/mount_chinese_smbshare.png

In the screenshot, I do have mounted the share with -E parameter which
should convert GB18030 folder names to UTF-8 but
actually no conversion is done (see the ls | iconv which shows what it
should be looking like if the conversion is done)

Actually I have never successfully done charset conversion with
mount_smbfs, what did I do wrong?


weiwu,

One thing comes to mind:  Try your question here:

http://us1.samba.org/samba/docs/FAQ/

and here:

http://us1.samba.org/samba/docs/man/Samba-HOWTO-Collection/

and here:

http://us1.samba.org/samba/archives.html

and here:

https://lists.samba.org/mailman/

Your question is specific to samba, and probably not related to 
FreeBSD-specific issues.


lane
P.S.  I note that the hosts in the links above are mostly us1.  
That's probably something to do with the language specification on my 
system, but may be different for you.  Check out www.samba.org for 
better links.


Your issue has to deal with locales and character sets. I think what 
you want to do is look into mount(8) and mount_smbfs(8), if you use 
fstab to specify mounts for the SMB share instead of smbmount.


A flag that sort of jumped out at me in mount_smbfs(8) was...

 -E cs1:cs2
 Specifies local (cs1) and server's (cs2) character sets.

Cheers,
-Garrett


	Also, I'm not sure if FreeBSD has been configured to run the particular 
character set you need (nor am I sure where any documentation may be 
regarding how to set that up), but you also want to explore getting that 
solved in tandem with the mount_smbfs item.
	Regardless of whether or not you specify the right character code for 
smbmount, if the character set isn't available to the system or setup 
properly, your specifying the character set with mount_smbfs is pretty 
much moot; I know because I use Japanese in Linux and was having similar 
issues until I got everything setup on the machine for Japanese reading 
and writing. FreeBSD China http://www.freebsd.org.cn/ probably holds 
the answers to your problem, if your system isn't setup to read/write 
Chinese.

Isn't cross-language communication fun =\?
-Garrett
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: (repost) cannot read windows share

2006-12-04 Thread 张韡武
在 2006-12-04一的 21:54 -0800,Garrett Cooper写道:
   Also, I'm not sure if FreeBSD has been configured to run the particular 
 character set you need (nor am I sure where any documentation may be 
 regarding how to set that up), but you also want to explore getting that 
 solved in tandem with the mount_smbfs item.

I read carefully with mount_smbfs and as far as I can tell mount_smbfs
is using iconv lib which compiled as kernel module. After I run
mount_smbfs I checked and made sure libiconv.ko is automatically loaded.
According to documents, mount_smbfs automatically load this kernel
module for charset conversion.

My charset specified in commandline is CP936 which is supported by
iconv. iconv can also support GB18030 GB2312 GBK which are
equivalents of CP936. I tried all these equivalents but none of them
works.

I also tried to specify -E UTF-8:junkjunk and got an error message says
junkjunk is not supported, this shows if I don't get such error message,
the charset I specified should be supported. Well, I didn't get such
error message with GB18030 GB2312 GBK...

 Regardless of whether or not you specify the right character code for 
 smbmount, if the character set isn't available to the system or setup 
 properly, your specifying the character set with mount_smbfs is pretty 
 much moot; I know because I use Japanese in Linux and was having similar 
 issues until I got everything setup on the machine for Japanese reading 
 and writing. FreeBSD China http://www.freebsd.org.cn/ probably holds 
 the answers to your problem, if your system isn't setup to read/write 
 Chinese.

Yes, thank you for pointing out this link, I actually checked that link
before coming to this list. From the documents on www.freebsd.org.cn
they did mentioned another problem related to Chinese share but I am
pretty sure it's not my problem...

   Isn't cross-language communication fun =\?

In reality, yes. In computer world, I hope I never had these
problems.

 -Garrett
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: (repost) cannot read windows share

2006-12-04 Thread 张韡武
在 2006-12-04一的 19:46 -0600,Lane写道:

 weiwu,
 
 One thing comes to mind:  Try your question here:
...
 Your question is specific to samba, and probably not related to 
 FreeBSD-specific issues.

My question is DIRECTLY freebsd-related because:
 I. samba itself don't have this problem (tried on SuSE, Debian and
Gentoo). mount -t cifs on Linux works fine.
II. mount_smbfs is a freebsd native tool
   III. charset conversion options of samba (iocharset and codepage) do
not work for mount_smbfs because mount_smbfs do not have these
options;
IV. mount_smbfs's charset option (-E) do not work for samba because
samba don't have this option
 V. samba's charset conversation is not using kernel module,
freebsd's mount_smbfs use kernel libiconv.ko module for
conversion;
VI. I tried to install samba from ports, and end up having samba
installed WITHOUT 'smbmount' command-line utility, it seems this
command is carefully removed for FreeBSD's port, forcing people
to use FreeBSD's mount_samba

Other strange thing:

I changed my locale to GB18030 and now I can list the Chinese
directories, but if I enter a Chinese directory then the application who
tries to enter the directory (e.g. ls) hangs. So it is strange for
me ... to understand.

 
 lane
 P.S.  I note that the hosts in the links above are mostly us1.  That's 
 probably something to do with the language specification on my system, but 
 may be different for you.  Check out www.samba.org for better links.
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: (repost) cannot read windows share

2006-12-04 Thread Antony Mawer

On 5/12/2006 5:28 PM, 张韡武 wrote:

在 2006-12-04一的 21:54 -0800,Garrett Cooper写道:
	Also, I'm not sure if FreeBSD has been configured to run the particular 
character set you need (nor am I sure where any documentation may be 
regarding how to set that up), but you also want to explore getting that 
solved in tandem with the mount_smbfs item.


I read carefully with mount_smbfs and as far as I can tell mount_smbfs
is using iconv lib which compiled as kernel module. After I run
mount_smbfs I checked and made sure libiconv.ko is automatically loaded.
According to documents, mount_smbfs automatically load this kernel

...

I don't know if this is at all useful, but I have come across the 
following patches, which appear to have been ported from Darwin, to 
improve handling of multibyte character sets:


http://people.freebsd.org/~imura/kiconv/

It would be interesting to see these committed (if they are valuable), 
as I know there are issues with FreeBSD mount_smbfs when operating 
against the Mac OSX samba implementation, which (I am told) only speaks 
UCS2.


Given the work already gone into these, it would be nice to see them 
finished off and committed... I wonder how many other smbfs-related 
improvements may exist in Darwin that might be worth looking at?


http://www.opensource.apple.com/darwinsource/10.4.8.x86/smb-217.18/

Cheers
Antony
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: (repost) cannot read windows share

2006-12-04 Thread 张韡武
在 2006-12-05二的 17:36 +1100,Antony Mawer写道:
[snip]
 I don't know if this is at all useful, but I have come across the 
 following patches, which appear to have been ported from Darwin, to 
 improve handling of multibyte character sets:
 
  http://people.freebsd.org/~imura/kiconv/
 
 It would be interesting to see these committed (if they are valuable), 
 as I know there are issues with FreeBSD mount_smbfs when operating 
 against the Mac OSX samba implementation, which (I am told) only speaks 
 UCS2.

Thank you very much for this very informative article. Here is what I
quoted from that article:
However, there are some limitations.
- unable to handle over 3 byte characters at all.
- tolower/toupper conversion is only possible for single byte
characters.
For example,  UTF-8 has 1-4 byte characters. GB18030 has 1,2,4
byte characters. At this time, we're unable to handle them.

So it is clear I will have problem, because it's being said, UTF-8 is
not possible. But UTF-16/USC2 should be possible and GB2312 should be
possible too because both are 2-bytes (UTF-16 are mostly 2-bytes).

Thus I should be able to:
1) adjust system locale to UTF-16 or USC2
2) use mount_smbfs -E UTF-16:GB2312

GB2312 is the stripped version of GB18030 that remove all GB18030 4-byte
characters from GB18030 (by discarding them).

But I think FreeBSD-6.1 do not include this nice person's work! Thus
even mount_smbfs -E UTF-16:GB2312 won't work for me.

Now I am really interested if I can get smbmount (part of samba)
working, if so, problem solved, otherwise there is no way to go.

 
 Given the work already gone into these, it would be nice to see them 
 finished off and committed... I wonder how many other smbfs-related 
 improvements may exist in Darwin that might be worth looking at?
 
  http://www.opensource.apple.com/darwinsource/10.4.8.x86/smb-217.18/
 
 Cheers
 Antony
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: (repost) cannot read windows share

2006-12-04 Thread Antony Mawer

On 5/12/2006 5:56 PM, 张韡武 wrote:

在 2006-12-05二的 17:36 +1100,Antony Mawer写道:
[snip]
I don't know if this is at all useful, but I have come across the 
following patches, which appear to have been ported from Darwin, to 
improve handling of multibyte character sets:


 http://people.freebsd.org/~imura/kiconv/

It would be interesting to see these committed (if they are valuable), 
as I know there are issues with FreeBSD mount_smbfs when operating 
against the Mac OSX samba implementation, which (I am told) only speaks 
UCS2.

...

But I think FreeBSD-6.1 do not include this nice person's work! Thus
even mount_smbfs -E UTF-16:GB2312 won't work for me.


No current versions of FreeBSD include the patches at the above site - 
my understanding is that they may still require some work before they 
are ready for committing.


I've CC'd R. Imura (who produced the patches) who may be able to answer 
the question (as well as possibly help you with your issue).




Now I am really interested if I can get smbmount (part of samba)
working, if so, problem solved, otherwise there is no way to go.


I believe smbmount is Linux-specific, so I think your best chance is 
trying to get the patches mentioned above finalised for your use.


Regards
Antony
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]