Summary: | [smbfs] mount_smbfs results are differ when utf-8 or UTF-8 local encoding's name is used | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Alexey Kovalenko <alexey_kovalenko> | ||||
Component: | kern | Assignee: | John Baldwin <jhb> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | CC: | amdmi3, emaste, jhb, simplexe | ||||
Priority: | Normal | ||||||
Version: | 9.0-RELEASE | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
See Also: | https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=134249 | ||||||
Attachments: |
|
Description
Alexey Kovalenko
2012-05-16 20:40:01 UTC
Responsible Changed From-To: freebsd-bugs->freebsd-fs Over to maintainer(s). How about change line 105 and 107 in /usr/src/sys/libkern/iconv_ucs.c from strcmp to strcasecmp ? Regards, Buganini (In reply to buganini from comment #2) > How about change line 105 and 107 in /usr/src/sys/libkern/iconv_ucs.c > from strcmp to strcasecmp ? > > Regards, > Buganini with strcasecmp all works ok. Created attachment 143407 [details]
kiconv_case.patch
I think this is correct as iconv(1) accepts case-insensitive encoding names. I think there is one other place that should also use strcasecmp() (when looking to see if we already have an existing encoding mapping that can be reused).
(In reply to John Baldwin from comment #4) > Created attachment 143407 [details] > kiconv_case.patch > > I think this is correct as iconv(1) accepts case-insensitive encoding names. > I think there is one other place that should also use strcasecmp() (when > looking to see if we already have an existing encoding mapping that can be > reused). Thx, i set strcasecmp in iconv_ucs.c and utf8 encoding map works ok. if i set koi8-r without patch strcasecmp in iconv.c then filename broken. your patch work fine. A commit references this bug: Author: jhb Date: Mon Jun 9 19:27:48 UTC 2014 New revision: 267291 URL: http://svnweb.freebsd.org/changeset/base/267291 Log: Use strcasecmp() instead of strcmp() when checking user-supplied encoding names so that encoding names are treated as case-insensitive. This allows the use of 'utf-8' instead of 'UTF-8' for example and matches the behavior of iconv(1). PR: 167977 Submitted by: buganini@gmail.com MFC after: 1 week Changes: head/sys/libkern/iconv.c head/sys/libkern/iconv_ucs.c Committed to HEAD, thanks! A commit references this bug: Author: jhb Date: Fri Jun 27 20:39:46 UTC 2014 New revision: 267980 URL: http://svnweb.freebsd.org/changeset/base/267980 Log: MFC 267291: Use strcasecmp() instead of strcmp() when checking user-supplied encoding names so that encoding names are treated as case-insensitive. This allows the use of 'utf-8' instead of 'UTF-8' for example and matches the behavior of iconv(1). PR: 167977 Changes: _U stable/10/ stable/10/sys/libkern/iconv.c stable/10/sys/libkern/iconv_ucs.c _U stable/9/sys/ stable/9/sys/libkern/iconv.c stable/9/sys/libkern/iconv_ucs.c |