From owner-freebsd-current@FreeBSD.ORG Thu Feb 12 18:37:47 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CD0E106574B for ; Thu, 12 Feb 2009 18:37:47 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-fx0-f16.google.com (mail-fx0-f16.google.com [209.85.220.16]) by mx1.freebsd.org (Postfix) with ESMTP id 7DEAA8FC29 for ; Thu, 12 Feb 2009 18:37:46 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: by fxm9 with SMTP id 9so225169fxm.19 for ; Thu, 12 Feb 2009 10:37:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=+CQ43fBqr4ule4+yoT44DsefcBMDkkghkm5LAsmOtxQ=; b=jty+g7w9tqBZxN6TE2HxOr0YlAMAREbHoMumOWgwT214qqJerkc+XedUMITjtsBFJ7 hDoYG2Bsh8rWrKzSHJDIYkhhNZCE3vgXioYH3+nX72r1/zxhO9kB8i4lXr1psz0CmltS w0EEvLs7DK1zrILH7A+rh81N/JDZRMX0j/K6g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; b=syfRq3s5UePFFKbWJcOHP8xS4VDggwJwgAs90wvfcaQuILGXXTVUoxqHNUlPBaTWm3 6OwcNxsMj6AoHIvZuEQcjVkfRIThMhYLzRlS55j9pbHDmuz4uzkXA2mSxeW1MTc73KSg FIJcGpLJ3Jbk1MsDUCQ5zgH6k92C3PAFeFPJs= Received: by 10.103.8.17 with SMTP id l17mr526922mui.125.1234463670875; Thu, 12 Feb 2009 10:34:30 -0800 (PST) Received: from localhost (cable-234-140.cgates.lt [79.133.234.140]) by mx.google.com with ESMTPS id b9sm493668mug.2.2009.02.12.10.34.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 12 Feb 2009 10:34:29 -0800 (PST) Date: Thu, 12 Feb 2009 20:34:40 +0200 From: Gleb Kurtsou To: =?utf-8?B?6KO05Zu95YW0?= Message-ID: <20090212183440.GA1446@tops> References: <98869b7c0902100112s6dae54bm4c14487076ceb75c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <98869b7c0902100112s6dae54bm4c14487076ceb75c@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-current@freebsd.org Subject: Re: patch: let msdosfs(vfat)/ntfs to support UTF-8 locale well X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 12 Feb 2009 18:37:48 -0000 On (10/02/2009 17:12), 裴国兴 wrote: > I write a patch to support UTF-8 locale well. I think it maybe help > for some FreeBSD user. > follow link is the patch (base on FreeBSD 7.1): > http://btload.googlegroups.com/web/msdosfs.patch?gda=MzIscT8AAABs_gmy4a1S9lRiXjEy-V5OpwtI67JnIGlz0zr18tjObOtoi5oIt3BJMRGeqGBbbj-ccyFKn-rNKC-d1pM_IdV0 > the full tar.bz2 package: > http://btload.googlegroups.com/web/msdosfs.tar.bz2?gda=IG1pBkEAAABs_gmy4a1S9lRiXjEy-V5OpwtI67JnIGlz0zr18tjObNLRc95Ps2S1UISaL0WhuitTCT_pCLcFTwcI3Sro5jAzlXFeCn-cdYleF-vtiGpWAA > > I also will patch for ntfs driver > http://btload.googlegroups.com/web/ntfs.patch?gda=OqsHoDwAAABs_gmy4a1S9lRiXjEy-V5O7RN7t-m4MjZ-5dQn_EvaqDVCWO9_HyYEQJyRQYPtRCL9Wm-ajmzVoAFUlE7c_fAt > http://btload.googlegroups.com/web/ntfs.tar.bz2?gda=zErXED4AAABs_gmy4a1S9lRiXjEy-V5O7RN7t-m4MjZ-5dQn_EvaqG3K0t6fVz8SMYStF_2dqCPjsKXVs-X7bdXZc5buSfmx > > The Chinese characters in the fat32 partition can be displayed correctly now. > > when mount windows partitions, you should do like this: > mount_ntfs -C UTF-8 /dev/ad?s? /path/to/mount > mount_msdosfs -L zh_CN.UTF-8 /dev/ad?s? /path/to/mount I've also looked at it recently but my idea was to update kiconv to handle ucs-2 (or whatever it is) -> utf-8 conversion in kernel. kiconv supports different translation methods. Current implementation just creates a table for ucs2->utf-8 conversion and passes it too kernel. It seems it can't even handle all of unicode chars. Fixing kiconv would be a better solution, imho.