I'm trying to create a portuguese comments in a t4 template of the Add Controller in my project.
The comments in t4 template:
/// <summary>
/// Controller que trata as requisições de pesquisa, inclusão, alteração e exclusão de <#= mvcHost.ControllerName.Replace("Controller", "") #>.
/// </summary>
The problem is when i add a controller, the comments appear like this:
/// <summary>
/// Controller que trata as requisi��es de pesquisa, inclus�o, altera��o e exclus�o de Teste.
/// </summary>
Obs: The square � is the black "? diamond" symbol.
So, how can i use latin characteres in a t4 template?
My Template:
<#@ template language="C#" HostSpecific="True" #>
<#@ output extension=".cs" encoding="UTF-8" #>
<#
MvcTextTemplateHost mvcHost = (MvcTextTemplateHost)(Host);
#>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace <#= mvcHost.Namespace #>
{
/// <summary>
/// Controller que trata as requisições de pesquisa, inclusão, alteração e exclusão de <#= mvcHost.ControllerName.Replace("Controller", "") #>.
/// </summary>
public class <#= mvcHost.ControllerName #> : Controller
{
// The class code
}
}