From nobody@FreeBSD.org  Wed May 16 19:34:16 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 1D56B1065670
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 May 2012 19:34:16 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 08AFC8FC16
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 May 2012 19:34:16 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q4GJYFA8003611
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 May 2012 19:34:15 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q4GJYF8k003605;
	Wed, 16 May 2012 19:34:15 GMT
	(envelope-from nobody)
Message-Id: <201205161934.q4GJYF8k003605@red.freebsd.org>
Date: Wed, 16 May 2012 19:34:15 GMT
From: Alexey <alexey_kovalenko@inbox.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: mount_smbfs results are differ when utf-8 or UTF-8 local encoding's name is used
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         167977
>Category:       kern
>Synopsis:       [smbfs] mount_smbfs results are differ when utf-8 or UTF-8 local encoding's name is used
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-fs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 16 19:40:01 UTC 2012
>Closed-Date:    
>Last-Modified:  Wed May 16 21:10:01 UTC 2012
>Originator:     Alexey
>Release:        9.0-RELEASE
>Organization:
>Environment:
FreeBSD ldserver 9.0-STABLE FreeBSD 9.0-STABLE #5: Tue May  8 11:37:38 GMT-6 2012     root@ldserver:/usr/obj/workdata/usr/src/sys/ldserver  amd64

>Description:
When .nsmbrc contains

[default]
charsets=UTF-8:cp866

remote (windows 2000) filenames with "&#8470;" character are displayed ok
( "123&#8470;123" ), but when 

[default]
charsets=utf-8:cp866

(note lo-case) filenames are garbaged ( same name as above wiil be "123?"). 

Thereis no SMBFS nor NETSMB options in kernel config
options LIBICONV is.

"&#8470;" is 3-byte in UTF-8. XLAT16_ACCEPT_3BYTE_CHR isn't used at build time.

ldserver# smbutil -v lc
SMB connections:
VC: \\SSS\USER
(root:wheel) 711
    state:    Session active
    flags:    0x0428 <private|encpwd>
    usecount: 1
    dialect:  6 (NT LM 0.12, Windows for Workgroups 3.1a, NT LANMAN 1.0)
    smode:    3
    caps:     0xf3fd <SMB_CAP_RAW_MODE|SMB_CAP_UNICODE|SMB_CAP_LARGE_FILES|SMB_CAP_NT_SMBS|SMB_CAP_NT_FIND>
    maxmux:   50
    maxvcs:   1
    Share:    D$(root:wheel) 711
        flags:    0x0004 <>
        usecount: 1
>How-To-Repeat:
mount remote smb share, look at files with "&#8470;" in name
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed May 16 20:22:26 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=167977 

From: Buganini <buganini@gmail.com>
To: bug-followup@FreeBSD.org, alexey_kovalenko@inbox.ru
Cc:  
Subject: Re: kern/167977: [smbfs] mount_smbfs results are differ when utf-8 or
 UTF-8 local encoding&#39;s name is used
Date: Thu, 17 May 2012 05:08:14 +0800

 How about change line 105 and 107 in /usr/src/sys/libkern/iconv_ucs.c
 from strcmp to strcasecmp ?
 
 Regards,
 Buganini
>Unformatted:
