CnPack Forum


 
Subject: cnpack BUG,谁知道怎么解决!!!
3304xfq
普通灌水员
Rank: 2



UID 37244
Digest Posts 0
Credits 89
Posts 33
点点分 89
Reading Access 10
Registered 2008-2-11
Status Offline
Post at 2008-2-11 18:49  Profile | Blog | P.M. 
cnpack BUG,谁知道怎么解决!!!

所有项目都在D7中开发,cnpack版本为最新(0.8.2.363),自从安装cnpack后,所有项目中汉字全部变成?????? ,而这个项目在D2007中可以正常显示汉字
但是编译出来的汉字还是不正常显示,除非动态指定如caption:='中国'


Image Attachment: [汉字问题] 未命名.jpg (2008-2-11 18:49, 4.55 K)

Top
3304xfq
普通灌水员
Rank: 2



UID 37244
Digest Posts 0
Credits 89
Posts 33
点点分 89
Reading Access 10
Registered 2008-2-11
Status Offline
Post at 2008-2-11 18:52  Profile | Blog | P.M. 
CnPack IDE Wizards 错误报告。

描述:
所有项目都在D7中开发,cnpack版本为最新(0.8.2.363),自从安装cnpack后,所有项目中汉字全部变成?????? ,而这个项目在D2007中可以正常显示汉字
但是编译出来的汉字还是不正常显示,除非动态指定如caption:='中国'


已经重装delphi和cnpack,无效



错误细节:
  该错误有 100% 的概率可重现。

步骤:
1. 从开始菜单中启动 Delphi 7
2. 一个默认的空工程被创建
3. 在主菜单中,选择...
4.
5.

设置:
  OS: Windows XP 5.1 (Build 2600: Service Pack 2)
  CnWizards: CnWizards_D7.DLL Ver: 0.8.2.363_Unstable Build 2008.01.24
  IDE: ideD71 CSS
  ComCtl32: 5.82.2900.2982

已安装的专家:
  F:\My Documents\Application Data\DDevExtensions\DDevExtensions7.dll = DDevExtensions
  F:\My Documents\Application Data\DelphiSpeedUp\DelphiSpeedUp7.dll = DelphiSpeedUp
  C:\Program Files\GExperts for Delphi 7\GExpertsD7.dll = GExperts
  C:\Program Files\ModelMakerTools\ModelMaker\9.10\bin\MMD7Expt.dll = ModelMakerExpert
  C:\Program Files\CnPack\CnWizards\CnWizards_D7.DLL = CnWizards_D7

已安装的包:
  Borland Integrated Translation Environment = c:\program files\borland\delphi7\Bin\dclite70.bpl
  Borland Standard Components = C:\Program Files\Borland\Delphi7\Bin\dclstd70.bpl
  Borland Database Components = C:\Program Files\Borland\Delphi7\Bin\dcldb70.bpl
  Borland Sample Components = c:\program files\borland\delphi7\Bin\dclsmp70.bpl
  Borland SQL Explorer UI Package = C:\Program Files\Borland\Delphi7\Bin\dbx70.bpl
  Borland ADO DB Components = c:\program files\borland\delphi7\Bin\dclado70.bpl
  Borland Editor Script Enhancements = c:\program files\borland\delphi7\Bin\dclsmpedit70.bpl
  Borland Control Panel Applet Package = c:\program files\borland\delphi7\Bin\applet70.bpl
  Borland Editor Emacs Enhancements = c:\program files\borland\delphi7\Bin\dclemacsedit70.bpl
  Borland Markup Language Wizards = c:\program files\borland\delphi7\Bin\dclmlwiz70.bpl
  Delphi 1.0 Compatibility Components = c:\program files\borland\delphi7\Bin\dcl31w70.bpl
  Shell Control Property and Component Editors = c:\program files\borland\delphi7\Bin\dclshlctrls70.bpl
  EhLib 4.0 Components = c:\program files\borland\delphi7\Projects\Bpl\DclEhLib70.bpl
  VclSkin Design Package = c:\program files\borland\delphi7\Projects\Bpl\WinSkinD7D.bpl
  ExpressDBTree by Developer Express Inc. = C:\Program Files\Developer Express Inc\ExpressDBTree\Delphi 7\Lib\dcldxDBTrD7.bpl
  ExpressTreePrintedDataSet by Developer Express Inc. = C:\Program Files\Developer Express Inc\ExpressDBTree\Delphi 7\Lib\dcldxTrMDD7.bpl
  Borland CLX Database Components = c:\program files\borland\delphi7\Bin\dclclxdb70.bpl
  Borland CLX Standard Components = C:\Program Files\Borland\Delphi7\Bin\dclclxstd70.bpl
  Borland Socket Components = C:\Program Files\Borland\Delphi7\Bin\dclsockets70.bpl
  ExpressMemData by Developer Express Inc. = C:\Program Files\Developer Express Inc\ExpressMemData\Delphi 7\Lib\dcldxmdsD7.bpl
  SynEdit component suite = c:\program files\borland\delphi7\Projects\Bpl\SynEdit_D7.bpl
  DSPack 2.3: Multimedia Package for Delphi = c:\program files\borland\delphi7\Projects\Bpl\DSPackDesign_D7.bpl
  Raize Components 4.3.2 = C:\Program Files\Raize\RC4\Bin\RaizeComponentsVcl_Design70.bpl
  Raize Components 4.3.2 (Data-Aware) = C:\Program Files\Raize\RC4\Bin\RaizeComponentsVclDB_Design70.bpl
  Internet Direct (Indy) for D7 Property and Component Editors = C:\Program Files\Borland\Delphi7\Bin\dclindy70.bpl
  Internet Component Suite (ICS) for Delphi 7 = c:\program files\borland\delphi7\Projects\Bpl\IcsDel70.bpl
  AD_View = c:\program files\borland\delphi7\Projects\Bpl\AD_Wave.bpl

已安装的 IDE 包:
  DelphiSpeedUp = F:\My Documents\Application Data\DelphiSpeedUp\DelphiSpeedUpLoader7.bpl
  DelphiSpeedUp Loader = C:\Documents and Settings\vlan1\Application Data\DelphiSpeedUp\DelphiSpeedUpLoader7.bpl
  Borland HTML IDE Package = $(DELPHI)\Bin\htmlide70.bpl
  String Resource Editor IDE Package = $(DELPHI)\Bin\stride70.bpl
  Borland Core IDE Package = $(DELPHI)\Bin\proide70.bpl
  Borland Delphi Professional IDE Package = $(DELPHI)\Bin\delphipro70.bpl
  Borland Delphi Core IDE Package = $(DELPHI)\Bin\delphide70.bpl
  Borland Module Diagram Editview = $(DELPHI)\Bin\designdgm70.bpl
  C++Builder Enterprise IDE Package = $(DELPHI)\Bin\delphient70.bpl
  $(DELPHI)\Bin\delphiclxide70.bpl = $(DELPHI)\Bin\delphiclxide70.bpl
  Borland Direct IDE Package = $(DELPHI)\Bin\direct70.bpl
  $(DELPHI)\Bin\delphivclide70.bpl = $(DELPHI)\Bin\delphivclide70.bpl
  Borland Compiler Messages Helper = $(DELPHI)\Bin\MsgInfo70.bpl
  Eagle Software CodeRush Loader = C:\WINDOWS\system32\CodeRushLoader70.bpl

CnPack IDE 专家启用状态:
  1 = CnAlignSizeWizard
  1 = CnMessageBoxWizard
  1 = CnComponentSelector
  1 = CnTabOrderWizard
  1 = CnBookmarkWizard
  1 = CnSrcTemplate
  1 = CnEditorWizard
  1 = CnMsdnWizard
  1 = CnPas2HtmlWizard
  1 = CnReplaceWizard
  1 = CnSourceDiffWizard
  1 = CnStatWizard
  1 = CnPrefixWizard
  1 = CnCorPropWizard
  1 = CnProjectExtWizard
  1 = CnCommentCropperWizard
  1 = CnRepositoryMenuWizard
  1 = CnExplorerWizard
  1 = CnFilesSnapshotWizard
  1 = CnProcListWizard
  1 = CnUsesCleaner
  1 = CnIdeEnhanceMenuWizard
  1 = CnIdeBRWizard
  1 = CnScriptWizard
  0 = CnFastCodeWizard
  1 = CnFormEnhanceWizard
  1 = CnSrcEditorEnhance
  1 = CnPaletteEnhanceWizard
  1 = CnInputHelper
  1 = CnVerEnhanceWizard
  1 = CnIniFilerWizard
  1 = CnMemProfWizard
  1 = CnCpuWinEnhanceWizard
  1 = CnWinTopRoller
  1 = CnSourceHighlight
  1 = CnDUnitWizard

CnPack IDE 专家创建状态:
  1 = TCnFastCodeWizard
  1 = TCnFormEnhanceWizard
  1 = TCnAlignSizeWizard
  1 = TCnMessageBoxWizard
  1 = TCnComponentSelector
  1 = TCnTabOrderWizard
  1 = TCnBookmarkWizard
  1 = TCnSrcTemplate
  1 = TCnEditorWizard
  1 = TCnMsdnWizard
  1 = TCnPas2HtmlWizard
  1 = TCnReplaceWizard
  1 = TCnSourceDiffWizard
  1 = TCnStatWizard
  1 = TCnPrefixWizard
  1 = TCnSrcEditorEnhance
  1 = TCnPaletteEnhanceWizard
  1 = TCnCorPropWizard
  1 = TCnProjectExtWizard
  1 = TCnCommentCropperWizard
  1 = TCnRepositoryMenuWizard
  1 = TCnIniFilerWizard
  1 = TCnMemProfWizard
  1 = TCnExplorerWizard
  1 = TCnFilesSnapshotWizard
  1 = TCnInputHelper
  1 = TCnProcListWizard
  1 = TCnVerEnhanceWizard
  1 = TCnUsesCleaner
  1 = TCnIdeEnhanceMenuWizard
  1 = TCnIdeBRWizard
  1 = TCnScriptWizard
  1 = TCnCpuWinEnhanceWizard
  1 = TCnDUnitWizard
  1 = TCnWinTopRoller
  1 = TCnSourceHighlight

CPU:
  # Processors: 1
  Type: Intel 586 model 10 Stepping 0
  Speed: 2204.16 MHz

键盘:
  Type 0: IBM enhanced (101- or 102-key) keyboard with OEM FKeys
  Layout: 中文 (简体) - 美式键盘 (ch) in KBDUS.DLL

本地化信息:
  Number of Digits: '2'
  Leading Zero: '0'
  List Separators: ','
  Grouping: '3;0'
  Decimal Separator: '.'
  Group Separator: ','
  Monetary Grouping: '3;0'
  Monetary Decimal Separator: '.'
  Monetary Group Separator: ','
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6804
Posts 3577
点点分 6804
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2008-2-14 16:05  Profile | Blog | P.M. 
卸载掉CnPack专家包后是否还仍然如此?
Top
3304xfq
普通灌水员
Rank: 2



UID 37244
Digest Posts 0
Credits 89
Posts 33
点点分 89
Reading Access 10
Registered 2008-2-11
Status Offline
Post at 2008-2-14 19:54  Profile | Blog | P.M. 
以前是那样,删除cnpack后还是那样(本来好好的,自从装了cnpack后才有这种问题的)

现在又发现一个问题

空窗体,上面放一个memo1,弄一段中文进去(比如我用的是windows的发布说明,READ1ST.TXT,里面是有很多中文)
在设计时,中文显示正常

运行时,中文全是乱码
-------------------------
设计时:

**********************************************************************
                        “Read First”版本发布说明
                Microsoft Windows 2000 Professional、
                      Windows 2000 Server 和
                   Windows 2000 Advanced Server
**********************************************************************

本文档提供了补充 Microsoft Windows 2000 文档的新增信息或其他信息。
Windows 2000 光盘 (CD) 包括以下版本发布说明文件:

   * Read1st.txt,此文件包含重要的预安装信息,位于 Windows 2000 CD
     根目录下。
   * “入门指南”中有关安装的章节,这部分包括系统要求信息,位于
     Windows 2000 CD 中的 \Setuptxt 文件夹。
   * Readme.doc,包含兼容性和安装后注意事项,位于 Windows 2000 C

----------------------

运行时:

**********************************************************************
                        ?°Read First?±°?±?·¢2??μ?÷
                Microsoft Windows 2000 Professional?¢
                      Windows 2000 Server oí
                   Windows 2000 Advanced Server
**********************************************************************

±???μμìá1?á?213? Microsoft Windows 2000 ??μμμ?D???D??¢?ò????D??¢?£
Windows 2000 1a?ì (CD) °üà¨ò???°?±?·¢2??μ?÷???t£o

   * Read1st.txt£?′????t°üo???òaμ??¤°2×°D??¢£???óú Windows 2000 CD
     ?ù???????£
   * ?°è????????±?DóD1?°2×°μ????ú£??a2?·?°üà¨?μí3òa?óD??¢£???óú
     Windows 2000 CD ?Dμ? \Setuptxt ???t?D?£
   * Readme.doc£?°üo???èYD?oí°2×°oó×¢òaê???£???óú Windows 2000 CD μ?
     ?ù???????£
   * ó2?t??èYáD±í?£óD1?×?D?μ? Windows 2000 ?§3?ó2?tμ?áD±í£???2???
     Microsoft Web ??μ? (http://www.microsoft.com/hcl/) μ?ó2?t??èY
     áD±í?£?úμ? Windows 2000 CD ?D°üਠWindows 2000 ·¢2?μ±ìì??áD±íμ?
     ?±±? (drive:\Support\Hcl.txt)?£




这个问题在delphi2007中正常(因为d2007我没有装cnpack,其它的控件都装了)

[ 本帖最后由 3304xfq 于 2008-2-14 19:58 编辑 ]


Image Attachment: [设计状态] 新建 BMP 图像.JPG (2008-2-14 19:58, 104.3 K)



Image Attachment: [运行状态] 1111.JPG (2008-2-14 19:58, 52.76 K)

Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6804
Posts 3577
点点分 6804
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2008-2-14 21:49  Profile | Blog | P.M. 
是不是控制面板的区域设置中改成不是中文的了?
Top
shenloqi
灌水处处长
Rank: 4



UID 34
Digest Posts 1
Credits 287
Posts 179
点点分 287
Reading Access 10
Registered 2003-3-15
Status Offline
Post at 2008-2-15 11:03  Profile | P.M. 
怀疑是系统的设置问题,请检查 控制面板 - 区域和语言选项 的 高级 页卡, 非Unicode程序 的那个下拉框 选择的是中文吗?
Top
3304xfq
普通灌水员
Rank: 2



UID 37244
Digest Posts 0
Credits 89
Posts 33
点点分 89
Reading Access 10
Registered 2008-2-11
Status Offline
Post at 2008-2-15 12:12  Profile | Blog | P.M. 
to shenloqi


Image Attachment: [回复shenloqi的话,再傻也不会这样弄的,更何况像语言这种东西,没事不会去弄的 ...] 新建 BMP 图像 (2).JPG (2008-2-15 12:12, 36.96 K)

Top
3304xfq
普通灌水员
Rank: 2



UID 37244
Digest Posts 0
Credits 89
Posts 33
点点分 89
Reading Access 10
Registered 2008-2-11
Status Offline
Post at 2008-2-15 12:14  Profile | Blog | P.M. 
to Passion

一直忙着干活,除了装个ppstream看看电影(双屏,一个屏幕看电影,一个屏幕写程序聊天等),其它什么都没弄过,连机子都不太关机的(我24小时开机的)
Top
3304xfq
普通灌水员
Rank: 2



UID 37244
Digest Posts 0
Credits 89
Posts 33
点点分 89
Reading Access 10
Registered 2008-2-11
Status Offline
Post at 2008-2-15 12:17  Profile | Blog | P.M. 
还有,发现这个问题时好时坏的,有时字符串正常,有时不正常

变化的情况是,每次重开delphi 以后,只要正常,那么这正常,如果不正常,那么保存后,dfm中的汉字会无法显示(电脑虽然不太关,但是调试程序,常常会搞得delphi死掉,所以....
Top
shenloqi
灌水处处长
Rank: 4



UID 34
Digest Posts 1
Credits 287
Posts 179
点点分 287
Reading Access 10
Registered 2003-3-15
Status Offline
Post at 2008-2-18 10:37  Profile | P.M. 
出问题的时候,dfm里面的中文字符串的内容是怎样的,是乱码还是中文或者是Unicode形式的数字? 如果dfm的内容正确的话,就可以检查运行时的信息,不然就要检查是不是装了什么插件导致了IDE不能正确保存中文字符串。

如果是运行时的问题,可以检查字体,字体的编码,ThreadLocale等信息,如果是IDE的问题,可以禁用一些IDE里的非Borland的包和Coderush,CnPack之类的专家包,定位出问题的根源,然后才能排查。
Top
3304xfq
普通灌水员
Rank: 2



UID 37244
Digest Posts 0
Credits 89
Posts 33
点点分 89
Reading Access 10
Registered 2008-2-11
Status Offline
Post at 2008-2-18 19:53  Profile | Blog | P.M. 
以"中国"为例 ,大家帮我看看

我感觉delphi应该把我的汉字转成"#123#123"的形式,不过好像没有转,是直接保存在dfm中了,是不是我装了cnpack后,哪个delphi核心组件被替换了?!!!



发上图片 ,大家看看


Image Attachment: [纯ASCII时的状态] 纯ASCII时的状态.JPG (2008-2-18 19:53, 28.24 K)



Image Attachment: [“中国“,及字体名(字体名也是中文,所以...).] “中国“,及字体名(字体名也是中文,所以...).JPG (2008-2-18 19:53, 23.44 K)



Image Attachment: [设计状态 “中国”] 设计状态 “中国”.JPG (2008-2-18 19:53, 1.63 K)



Image Attachment: [16进制时] 16进制时.JPG (2008-2-18 19:53, 83.55 K)

Top
3304xfq
普通灌水员
Rank: 2



UID 37244
Digest Posts 0
Credits 89
Posts 33
点点分 89
Reading Access 10
Registered 2008-2-11
Status Offline
Post at 2008-2-18 20:01  Profile | Blog | P.M. 
我系统正常,不管是运行老的exe(当然那时还只是ASCII码保存汉字时代),或是新的exe,用unicode保存

还是其它的游戏等等,汉字都是正常显示的,补丁也是最新的,机子没有病毒,虽然我从不装杀毒软件,但是写程序的人,对于自己机子有没有病毒应该是清楚的,天天对着电脑,有什么异常,都会知道的

只有delphi7,且装了cnpack后再出现这种情况,D2007原来也有这种问题(D2007用的不多,不是很清楚出现的机率),后来重装d2007,sp3,且不装cnpack,到也没有发生过中文问题

D7中,新建工程,保存重新打开。。。都正常,但是用一段时间后(半小时到半天不等),突然发现汉字已经全部变样了
Top
shenloqi
灌水处处长
Rank: 4



UID 34
Digest Posts 1
Credits 287
Posts 179
点点分 287
Reading Access 10
Registered 2003-3-15
Status Offline
Post at 2008-2-19 13:19  Profile | P.M. 
我没有中文的项目,应该cnpack不会做这样的事情,我觉得可以从以下几个方面考虑:
1.我看到楼主装了GExperts,如果楼主使用GExperts的查找替换功能,或者类似的功能的话,因为GExperts对中文的支持很不好,会发生将所有代码(如果替换时包含dfm文件)中的中文变为乱码。所以建议禁用GExperts的替换和跟替换相关的功能。
2.CodeRush或MMX我很久不用了,不知道会不会有类似GExperts的功能,我想多半是使用Delphi的过程中激活了这些专家包的某些功能才发生乱码的问题的。
3.会不会楼主使用了CnPack的脚本专家的某些功能,这部分我不是很熟悉,不过我想也可能某些Sample或自己写的脚本会导致该问题发生,如果确认是Cnpack引入的问题,可以采用排除法看看是什么模块引起的问题。
建议楼主从这三个方面入手看看,协助查出问题到底出在哪里。
Top
3304xfq
普通灌水员
Rank: 2



UID 37244
Digest Posts 0
Credits 89
Posts 33
点点分 89
Reading Access 10
Registered 2008-2-11
Status Offline
Post at 2008-2-20 12:33  Profile | Blog | P.M. 
回复shenloqi

1.GExperts早就被我删除了
2.CodeRush没有dfm的功能部分,他只处理代码,也就是一个代码助手,这一点可以从他的设置里看,完全是代码自动完成的一些设置,还有代码颜色等
3.cnpack的脚 本专家我没有用,我只是重装系统,装好delphi,测试正常,再装cnpack,就不正常了,然后删除cnpack,还不是正常,最后删除注册表USER的borland项,重启delphi后,dephi变成干净了,这样中文又正常了
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6804
Posts 3577
点点分 6804
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2008-2-20 17:11  Profile | Blog | P.M. 
照楼上说,可能注册表的User下的borland项中有玄机,能否将出问题后此分支的内容export成reg文件发给我们看看?
Top
Alan (Alan)
新警察
Rank: 1



UID 61
Digest Posts 0
Credits 25
Posts 18
点点分 25
Reading Access 10
Registered 2003-4-26
Status Offline
Post at 2008-2-20 17:37  Profile | Blog | P.M.  | QQ
请尝试这样解决:
1、清除窗体及所有其上控件里的输入法名称,注意不要保存窗体。
2、将输入法默认设为美国英语。
3、运行程序验证是否正常。
Top
Alan (Alan)
新警察
Rank: 1



UID 61
Digest Posts 0
Credits 25
Posts 18
点点分 25
Reading Access 10
Registered 2003-4-26
Status Offline
Post at 2008-2-20 17:39  Profile | Blog | P.M.  | QQ
补充一下,第二点是设置系统的输入法设置。
Top
3304xfq
普通灌水员
Rank: 2



UID 37244
Digest Posts 0
Credits 89
Posts 33
点点分 89
Reading Access 10
Registered 2008-2-11
Status Offline
Post at 2008-3-2 16:19  Profile | Blog | P.M. 
未知原因

但现在汉字已经好了,再也没有出现过,我又重装系统,以前装的控件,软件我都安装了,没有发生任何的Expert冲突
Top
skycn
新警察
Rank: 1



UID 41006
Digest Posts 0
Credits 4
Posts 2
点点分 4
Reading Access 10
Registered 2008-9-25
Status Offline
Post at 2008-9-25 11:18  Profile | Blog | P.M. 
我也出现过这种情况。把插件控件卸载了,Delphi重装了,也不行。后来重装操作系统才搞定。
接着装插件和控件的时候,又出现一次这样的情况。
插件有DelphiSpeedUp,CnWizards,GExpert,MMX4.20
控件有:JVCL,Indy9,Apro,CoolTrayIcon,Comport,DevExpress,TMS Component Pack.

然后再重装操作系统。然后再按装Delphi、插件、控件,还是一样的东西,又没问题了。

出现问题的时候:

保存的汉字变成ASCII的编码保存,而不是Unicode的编码保存。所以,它解释原来的窗体的时候,就都是????。
比如“寿”:应该是#23551,在DFM里面却保存为:#91#255.
看了控制面板的区域和语言设置,没有问题的。重新设置为中文、繁体中文,都是一样。
Top
skycn
新警察
Rank: 1



UID 41006
Digest Posts 0
Credits 4
Posts 2
点点分 4
Reading Access 10
Registered 2008-9-25
Status Offline
Post at 2008-9-25 11:24  Profile | Blog | P.M. 
出问题的时候,我试过用Delphi读当前代码页是936。
另一台机上没出现过这样的问题。
Top
 




All times are GMT++8, the time now is 2024-9-17 03:40

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.009030 second(s), 8 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP