Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Dec 2006 10:29:37 +0800
From:      =?big5?B?Q2h1bi1UaWVuIENoYW5nICixaadnpNEp?= <tcs@kitty.2y.idv.tw>
To:        <ache@FreeBSD.org>
Cc:        ports@FreeBSD.org
Subject:   FreeBSD Port: unrar-3.60,4
Message-ID:  <002201c71ccc$34772c80$af58728c@penguin>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?002201c71ccc$34772c80$af58728c>