Hello,
some of the columns in our database contains special characters (ä,ö,ü).
The characters are converted to ä, ö or ü unicode strings.
To solve the issue for me, I have created a hbs-helper, which simple writes the property-name with the WriteSafeString-Method of the TextWriter.
Helper registration:
public void ConfigureDesignTimeServices(IServiceCollection services)
{
var options = ReverseEngineerOptions.DbContextAndEntities;
services.AddHandlebarsScaffolding(options);
Handlebars.RegisterHelper("f-pn", FormatPropertyName);
}
void FormatPropertyName(TextWriter writer, object context, object[] args)
{
writer.WriteSafeString(args[0].ToString());
}
Usage in templates:
{{f-pn property-name}}
I think, the property-name template should use the WriteSafeString-Method.