diff --git a/README.md b/README.md index 4a79b4b8d8fab3eec73d4b3bdc64164818a7d649..094a53ea277b1d0a091f1a7fb4b661b148e8fdcc 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ ![封面](images/Cover.png) ## 提示:发行版zip包在[gitee](https://gitee.com/liulei901112/TextLocator)下,[github](https://github.com/liulei901112/TextLocator)只是同步了代码 +## 欢迎有兴趣和想法的开发者加入,为项目舔砖加瓦。 #### 软件介绍 基于.net实现的本地文档的全文索引定位器,根据关键词搜索定位本地文档内容。便于查找历史文档时节省时间,本地文档全文搜索神器! @@ -16,6 +17,9 @@ * 运行环境基于.net freamwork 4.6.1(需要安装此环境才能运行) * 发布版下载解压可用(或自己下载源码编译) +#### 操作演示 +![操作演示](images/video.gif) + #### 软件截图 ![主界面](images/MainWindow.png) ![区域管理](images/SearchAreaManagement1.png) diff --git a/TextLocator/Service/ExcelFileService.cs b/TextLocator/Service/ExcelFileService.cs index 1b9f9cffac145186cd2a4f364972b29c012170dc..bca3e3ea1fa5f509af6b52aa1cbbcf0963af4908 100644 --- a/TextLocator/Service/ExcelFileService.cs +++ b/TextLocator/Service/ExcelFileService.cs @@ -199,7 +199,7 @@ namespace TextLocator.Service int cellCount = row.LastCellNum; for (int k = 0; k < cellCount; k++) { - builder.Append(row.GetCell(j) + " "); + builder.Append(row.GetCell(k) + " "); } builder.AppendLine(); } diff --git a/TextLocator/Service/ZipFileService.cs b/TextLocator/Service/ZipFileService.cs index 9d659310833ea43415b2d6c677181732ae79561e..94a2443a982cbcccfa2822121863c1927f3b1523 100644 --- a/TextLocator/Service/ZipFileService.cs +++ b/TextLocator/Service/ZipFileService.cs @@ -1,6 +1,7 @@ using log4net; using SharpCompress.Archives; using SharpCompress.Common; +using SharpCompress.Readers; using System; using System.Collections.Generic; using System.IO; @@ -44,10 +45,18 @@ namespace TextLocator.Service builder.Append(" 大小:" + FileUtil.GetFileSizeFriendly(fileInfo.Length)); builder.Append(" 列表:=> \r\n"); + // 解析列表 using (FileStream file = File.OpenRead(filePath)) { - using (var archive = ArchiveFactory.Open(file)) + //设置编码,解决解压文件时中文乱码 + var archiveEncoding = new ArchiveEncoding(); + archiveEncoding.Default = System.Text.Encoding.GetEncoding("gbk"); + var options = new ReaderOptions + { + ArchiveEncoding = archiveEncoding + }; + using (var archive = ArchiveFactory.Open(file, options)) { foreach (var entry in archive.Entries) { diff --git a/images/video.gif b/images/video.gif new file mode 100644 index 0000000000000000000000000000000000000000..b7470cf25b639292e107f5c56d55c58f85b3c954 Binary files /dev/null and b/images/video.gif differ