From owner-freebsd-current@FreeBSD.ORG Mon Dec 15 11:59:57 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 904) id 1DBD216A4CF; Mon, 15 Dec 2003 11:59:57 -0800 (PST) Date: Mon, 15 Dec 2003 11:59:57 -0800 From: Max Khon To: Alexander Zagrebin Message-ID: <20031215195957.GC22232@FreeBSD.org> References: <200312121243.11908.alexz@visp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200312121243.11908.alexz@visp.ru> User-Agent: Mutt/1.4.1i cc: freebsd-current@freebsd.org cc: imura@ryu16.org Subject: Re: RELENG_5_2 ntfs mounting problem X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2003 19:59:57 -0000 Hello! On Fri, Dec 12, 2003 at 12:43:11PM +0300, Alexander Zagrebin wrote: I forward this to Ryuichiro Imura (he is kiconv maintainer and have recently got his commit bit back). > The FreeBSD 5.2-RC has problem with russian (cyrillic) file names on NTFS > volumes. > If the file name is "ั‚ะตัั‚" (hex: 0xd4 0xc5 0xd3 0xd4), then after mounting its > name looks like 0xff 0xd4 0xff 0xc5 0xff 0xd3 0xff 0xd4, so file is > inaccessible. > I reason is in function "wchar ntfs_u28" (file ntfs_subr.c). > This function returns value of outbuf (char), converted to wchar. The highest > bit of russian characters (koi8-r encoding) is always 1, so this conversion > works incorrectly (data type char is signed). > > This patch solves the problem. > ===================================================== > --- ntfs_subr.c.orig Fri Dec 12 12:00:31 2003 > +++ ntfs_subr.c Fri Dec 12 11:47:32 2003 > @@ -2143,7 +2143,8 @@ > struct ntfsmount *ntmp, > wchar wc) > { > - char *p, *outp, inbuf[3], outbuf[3]; > + char *p, *outp, inbuf[3]; > + unsigned char outbuf[3]; > size_t ilen, olen; > > if (ntfs_iconv && ntmp->ntm_ic_u2l) { > ===================================================== > > Alexander Zagrebin > --