From owner-freebsd-ports@FreeBSD.ORG Mon Dec 11 02:29:32 2006 Return-Path: X-Original-To: ports@FreeBSD.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CDD1516A403; Mon, 11 Dec 2006 02:29:32 +0000 (UTC) (envelope-from tcs@kitty.2y.idv.tw) Received: from kitty.2y.idv.tw (kuririn.cs.nthu.edu.tw [140.114.88.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 609E643CA2; Mon, 11 Dec 2006 02:28:17 +0000 (GMT) (envelope-from tcs@kitty.2y.idv.tw) Received: from penguin (penguin.cs.nthu.edu.tw [140.114.88.175]) (authenticated user=tcs bits=0) by kitty.2y.idv.tw (8.13.6/8.13.6) with ESMTP id kBB2TUOa045124; Mon, 11 Dec 2006 10:29:30 +0800 (CST) (envelope-from tcs@kitty.2y.idv.tw) From: =?big5?B?Q2h1bi1UaWVuIENoYW5nICixaadnpNEp?= To: Date: Mon, 11 Dec 2006 10:29:37 +0800 Message-ID: <002201c71ccc$34772c80$af58728c@penguin> MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AccczDQviX4NeaJCQIOjudazmIWgRw== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Mailman-Approved-At: Mon, 11 Dec 2006 03:10:17 +0000 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: ports@FreeBSD.org Subject: FreeBSD Port: unrar-3.60,4 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2006 02:29:32 -0000 I found that LC_ALL is not working well in unrar with some charset like (zh_TW.Big5, zh_CN.GBK, zh_CN.GB2312,zh_CN.eucCN) I provide the patch for reference. --- arcread.cpp.orig Mon Dec 11 10:05:05 2006 +++ arcread.cpp Mon Dec 11 10:12:47 2006 @@ -197,6 +197,8 @@ else { Length++; + /* We should try system multibyte function mbstowcs first. */ + if(mbstowcs(hd->FileNameW,FileName,sizeof(hd->FileName)/sizeof(hd->FileName[ 0])-1)==-1) NameCoder.Decode(FileName,(byte *)FileName+Length, hd->NameSize-Length,hd->FileNameW, sizeof(hd->FileNameW)/sizeof(hd->FileNameW[0])); --- extract.cpp.orig Mon Dec 11 10:07:47 2006 +++ extract.cpp Mon Dec 11 10:15:33 2006 @@ -271,7 +271,8 @@ { ConvertPath(Arc.NewLhd.FileNameW,ArcFileNameW); char Name[NM]; - if (WideToChar(ArcFileNameW,Name) && IsNameUsable(Name)) + /* We should check name in ArcFileNameW. I think we don't need to check here. */ + if (WideToChar(ArcFileNameW,Name)/* && IsNameUsable(Name)*/) strcpy(ArcFileName,Name); } #endif