FreeBSD Port: unrar-3.60,4
Chun-Tien Chang (張君天)
tcs at kitty.2y.idv.tw
Sun Dec 10 18:29:32 PST 2006
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
More information about the freebsd-ports
mailing list