From owner-freebsd-current@FreeBSD.ORG Fri Feb 13 04:20:00 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 EA1B4106566B for ; Fri, 13 Feb 2009 04:19:59 +0000 (UTC) (envelope-from pagxir@gmail.com) Received: from mail-bw0-f170.google.com (mail-bw0-f170.google.com [209.85.218.170]) by mx1.freebsd.org (Postfix) with ESMTP id 4A9F68FC08 for ; Fri, 13 Feb 2009 04:19:58 +0000 (UTC) (envelope-from pagxir@gmail.com) Received: by bwz18 with SMTP id 18so1858665bwz.19 for ; Thu, 12 Feb 2009 20:19:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=2feJGkGpp5yiAB+7MbdRoexZ86Fuc/Wwv1EyiXEzUZs=; b=fmDi7cOoHjw8sG6fyzkfmWaAFxqOZfhSY8xbrgq0CFz0WoA2O1GmnlSac9NXfjWvBr Bp45wZ/uqGrQLEv+MyenVjiNvHI+fuw+7vh4exuDcIywCqMN89TcqIaj6P8zoHASKcZy nkut6tbH24r6zvWNMTImo5Ujg/RZiJlVefKqM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=d8E+zmPastcCtS9Ap7Hr2UagVZfXsE/tmMsxlwzKyL6AE/OmuIHppEo38GCXpyLjBc 5PHhMS4DavDiU0kWilkNOSe5xqEYZ6OCgtMylas9Ki7kjWb+hU2gxvwupX2CqgyojWEg kvLm/z8Jy9tDKh54PJdzoMo3yWbxzQwly9tYw= MIME-Version: 1.0 Received: by 10.103.2.14 with SMTP id e14mr868747mui.48.1234498797391; Thu, 12 Feb 2009 20:19:57 -0800 (PST) In-Reply-To: <20090212183440.GA1446@tops> References: <98869b7c0902100112s6dae54bm4c14487076ceb75c@mail.gmail.com> <20090212183440.GA1446@tops> Date: Fri, 13 Feb 2009 12:19:57 +0800 Message-ID: <98869b7c0902122019i99c2999td7e2ea8e65fcc17d@mail.gmail.com> From: =?UTF-8?B?6KO05Zu95YW0?= To: Gleb Kurtsou Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Fri, 13 Feb 2009 04:20:00 -0000 En. It is a good idea. When to patch msdosfs, I first try to use kiconv and found that non-ascii code always convert fail. I have the source code a quickview and sure that kiconv not support UTF-8. Not familiar with kiconv, I hardcode Into the msdosfs source code. If kiconv support UTF-8, msdosfs only needs a few change. It seems someone also do similar job. the link: http://people.freebsd.org/~imura/kiconv/ the related archive message: http://www.mail-archive.com/freebsd-hackers@freebsd.org/msg57285.html 2009/2/13 Gleb Kurtsou : > On (10/02/2009 17:12), =E8=A3=B4=E5=9B=BD=E5=85=B4 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=3DMzIscT8AAABs_gmy4= a1S9lRiXjEy-V5OpwtI67JnIGlz0zr18tjObOtoi5oIt3BJMRGeqGBbbj-ccyFKn-rNKC-d1pM_= IdV0 >> the full tar.bz2 package: >> http://btload.googlegroups.com/web/msdosfs.tar.bz2?gda=3DIG1pBkEAAABs_gm= y4a1S9lRiXjEy-V5OpwtI67JnIGlz0zr18tjObNLRc95Ps2S1UISaL0WhuitTCT_pCLcFTwcI3S= ro5jAzlXFeCn-cdYleF-vtiGpWAA >> >> I also will patch for ntfs driver >> http://btload.googlegroups.com/web/ntfs.patch?gda=3DOqsHoDwAAABs_gmy4a1S= 9lRiXjEy-V5O7RN7t-m4MjZ-5dQn_EvaqDVCWO9_HyYEQJyRQYPtRCL9Wm-ajmzVoAFUlE7c_fA= t >> http://btload.googlegroups.com/web/ntfs.tar.bz2?gda=3DzErXED4AAABs_gmy4a= 1S9lRiXjEy-V5O7RN7t-m4MjZ-5dQn_EvaqG3K0t6fVz8SMYStF_2dqCPjsKXVs-X7bdXZc5buS= fmx >> >> 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. > >