[英]Use Unicode in T4 Templates
I have some Persian characters in T4 templates, but all of them show up as ?
我在T4模板中有一些波斯字符,但所有这些字符都显示为
?
. 。 I use template - generator and this is my script to use generator:
我使用模板-生成器,这是使用生成器的脚本:
<#@ template language="C#v4" hostspecific="True" debug="True" #>
<#@ assembly name="System.Core" #>
<#@ output extension=".cs" encoding="UTF8" #>
<#@ include file="T4Toolbox.tt" #>
<#@ include file="AllGenerator.tt" #>
<#
AllGenerator generator = new AllGenerator();
generator.DatabaseName = "MyDatabase";
generator.Run();
#>
According to this question I must save with Unicode, but I can't do it. 根据这个问题,我必须使用Unicode进行保存,但是我不能这样做。 When I select
Save as
, the Save Type as
option is just T4 Editor (*.tbx)
and there is no option to save with Unicode. 当我选择
Save as
T4 Editor (*.tbx)
, Save Type as
选项只是T4 Editor (*.tbx)
,没有使用Unicode保存的选项。 Like this: 像这样:
So how can I use Persian characters in T4? 那么如何在T4中使用波斯字符? Is there any problem on my side?
我这边有什么问题吗?
This looks like a bug in the T4 editor add-on that you're using. 这看起来像您正在使用的T4编辑器加载项中的错误。 You could try uninstalling that temporarily.
您可以尝试暂时将其卸载。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.