You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Property names with special characters (ä,ö,ü) are converted to unicode strings #30
I think, the property-name template should use the WriteSafeString-Method.
Perhaps you should open an issue on Handlebars.Net, since the templates should use WriteSafeString? I recommend that, because it would solve the problem of special characters globally.
In my investigation, I found that some Chinese are not encoded because SuppressEncoding is true, because I am not familiar with this project and do not know where to assign SuppressEncoding
Not so.This flag already exists in Handlebar. Net in V1.I think we should find out why some Chinese SuppressEncoding is false and some Chinese SuppressEncoding is true instead of directly modifying the default value
@Varorbc I think the setting is NoEscape. According to issue 276 in Handlebars.Net, support for noEscape was added to Handlebars.Net with PR 375 in 2.0.0-preview-2. I will look into how we can set this to true.
Activity
tonysneed commentedon Jul 20, 2018
You should add your helper like so:
See here.
Perhaps you should open an issue on Handlebars.Net, since the templates should use
WriteSafeString? I recommend that, because it would solve the problem of special characters globally.ErikEJ commentedon Jul 31, 2018
Reported here: ErikEJ/EFCorePowerTools#77
ErikEJ commentedon Jul 31, 2018
EF Core team (and I) use UTF8 encoding...
tonysneed commentedon Dec 17, 2018
@ErikEJ What do you think I should do to fix this?
ErikEJ commentedon Dec 18, 2018
It looks like a Handlebars issue to me...
https://github.com/TrackableEntities/EntityFrameworkCore.Scaffolding.Handlebars/blob/master/src/EntityFrameworkCore.Scaffolding.Handlebars/Internal/FileSystemFileService.cs#L65
tonysneed commentedon Dec 27, 2018
Confirmed this is a Handlebars.Net issue. There needs to be a way to suppress HTML encoding. See Issue 276 there.
tonysneed commentedon Jul 17, 2019
Closing, as this needs to be fixed by Handlebars.NET.
tonysneed commentedon Sep 8, 2021
Re-opening, as this issue was fixed in v2 of Handlebars.Net.
Varorbc commentedon Sep 24, 2021
If this option is not checked, Chinese will not be encoded.
ErikEJ commentedon Sep 24, 2021
The option is: Use Data Annotations
Varorbc commentedon Sep 24, 2021
In addition, it is strange that some Chinese is not encoded
Varorbc commentedon Sep 24, 2021
In my investigation, I found that some Chinese are not encoded because
SuppressEncodingistrue, because I am not familiar with this project and do not know where to assignSuppressEncodinghttps://github.com/Handlebars-Net/Handlebars.Net/blob/ad5c616c58397c6d52507c859cb9f1b397580e3a/source/Handlebars/IO/EncodedTextWriter.cs#L48-L57
tonysneed commentedon Sep 24, 2021
This flag was added in Handlebars.Net in v 2 and defaults to
true. I think we just need to set it tofalse.tonysneed commentedon Sep 24, 2021
I am wondering how to reproduce the encoding issue on my side. @Varorbc, @ErikEJ Any tips?
Varorbc commentedon Sep 24, 2021
Not so.This flag already exists in Handlebar. Net in V1.I think we should find out why some Chinese
SuppressEncodingisfalseand some ChineseSuppressEncodingistrueinstead of directly modifying the default valuetonysneed commentedon Sep 24, 2021
@Varorbc I think the setting is
NoEscape. According to issue 276 in Handlebars.Net, support fornoEscapewas added to Handlebars.Net with PR 375 in 2.0.0-preview-2. I will look into how we can set this totrue.tonysneed commentedon Sep 24, 2021
@Varorbc Please pull down PR #178 and test to see if it resolves encoding issues.