惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
云风的 BLOG
云风的 BLOG
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园_首页
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
博客园 - 叶小钗
MongoDB | Blog
MongoDB | Blog
N
News and Events Feed by Topic
Microsoft Security Blog
Microsoft Security Blog
Apple Machine Learning Research
Apple Machine Learning Research
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Tailwind CSS Blog
Google DeepMind News
Google DeepMind News
IT之家
IT之家
W
WeLiveSecurity
P
Proofpoint News Feed
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
月光博客
月光博客
Schneier on Security
Schneier on Security
博客园 - 三生石上(FineUI控件)
Application and Cybersecurity Blog
Application and Cybersecurity Blog
腾讯CDC
H
Heimdal Security Blog
Y
Y Combinator Blog
Engineering at Meta
Engineering at Meta
量子位
宝玉的分享
宝玉的分享
博客园 - 【当耐特】
V
Visual Studio Blog
L
LangChain Blog
Last Week in AI
Last Week in AI
The Cloudflare Blog
Hacker News: Ask HN
Hacker News: Ask HN
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Security Archives - TechRepublic
Security Archives - TechRepublic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
SecWiki News
SecWiki News
Simon Willison's Weblog
Simon Willison's Weblog
Security Latest
Security Latest
A
Arctic Wolf
T
Tenable Blog
I
Intezer
P
Privacy International News Feed
Attack and Defense Labs
Attack and Defense Labs
N
News | PayPal Newsroom
Martin Fowler
Martin Fowler

博客园 - BG5SBK

公告:胡搞瞎搞工作室换地方了! 本周末厦门.NET俱乐部活动(借首页发下....不好意思) BG5SBK.FrameworkV2 新版本与帮助文档发布 BG5SBK.FrameworkV2.Data 支持语言化查询了 设计了一张89S51实验板 Flex Builder 2 注册码 OpCodes中文说明(转&收藏) DIY 的 LinQ 感光电路板制作(转&收藏) 上拉与下拉电阻(转&收藏) 虾米是怎样炼成的(转&收藏) GBA开发入门(转&收藏) ARM的开发步骤(转&收藏) 关于SQL 参数的一次测试(重新又测了一次) 打火机组装摩托车(Cool!) 收藏几个有意思的SQL脚本 BG5SBK.FrameworkV2.DataLayer更新,附带详细说明 今天老婆给我画的画像 不用客户端软件的杂志平台Koo123
支持.NET 2.0又支持中文的NDoc
BG5SBK · 2006-08-18 · via 博客园 - BG5SBK

   NDoc是将XML注释生成.chm等帮助文档的工具,对需要生成文档的程序员很有帮助,它不光可以生成.chm还可以支持另外几种文档格式,大家自己试吧。

   因为公司文档生成的需要,我下了一个NDoc,原先用VS2003时可以很方便的将XML注释生成HTML文档,不知道为什么M$在VS2005厘米就没提供这个功能。

    下来以后发现NDoc只能支持1.0和1.1的.Net运行时,我试着载入一个.NET 2.0下编译的DLL,结果运行失败。

    后来在一个外国人的Blog上下到他改造的支持.NET 2.0的NDoc,下完以后一试还真能可以生成文档了,结果打开文档一看,心凉了半截,中文全部变??了。

    于是我只能自己修改NDoc的代码了(在那位仁兄的代码基础上),经过一番试验后找到了解决乱码问题的关键

    currentFileEncoding = Encoding.GetEncoding(ci.TextInfo.ANSICodePage);

    我把这段话该成:

    currentFileEncoding = Encoding.UTF8; //.GetEncoding(ci.TextInfo.ANSICodePage);

    生成中文文档成功!

    但是ci.TextInfo.ANSICodePage哪里来的?我逐一查找代码发现原来NDoc界面上有一个LangID的设置,我真晕,里面还能设置Chinese。

    我拿未修改的NDoc选择Chinese生成了一遍文档,发现是可以显示中文了,但是还是有很多??,所以我之前做的修改还不算白费啊。

    这里把我修改的代码和可执行文件共享给大家,需要的人就下去用吧,哈哈

   可执行文件:

ndoc-bin-1.3.1-v16.rar
   源代码:ndoc-src-1.3.1-v16.rar
  

posted on 2006-08-18 19:30  BG5SBK  阅读(5535)  评论()    收藏  举报