Delphi中Templates代码模板添加注意事项

今天用Delphi中的代码模板添加一段代码,结果就是有问题,多次测试后,发现是编码需要注意。

<?xml version="1.0" encoding="GB2312" ?>  <!--若下面的数据中包含中文,这里必须要用GB2312,否则这个代码模板将无法使用-->
<codetemplate    xmlns="http://schemas.borland.com/Delphi/2005/codetemplates"
                version="1.0.0">
    <template name="ad_msg1" invoke="manual">
        <description>
                  msg1
        </description>
        <author>
            ad
        </author>
        <code language="Delphi"><![CDATA[      <!--这里语言Delphi必须填写-->
 if Application.MessageBox('您是否确定进行该操作?','信息确认框',MB_YESNO) = IDNO then exit; <!--这里有中文,上面要用GB2312--> ]]> </code> </template> </codetemplate>
原文地址:https://www.cnblogs.com/KKSoft/p/7117732.html