This is a migrated thread and some comments may be shown as answers.

Load template with german umlaut

2 Answers 33 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alexandra
Top achievements
Rank 1
Alexandra asked on 07 Jul 2017, 06:29 AM

Hi

I have a kendo template that uses resources and one of the german resorces has an umlaut. The template is loaded using kendo.template and kendo.render.

I found a link that complains about this http://www.telerik.com/forums/german-umlauts-not-working-in-listview%27s-client-template-when-coming-from-resources but the solution from there does not work: Html.Raw

I have tried also 
@Html.Raw(HttpUtility.HtmlEncode(Resources.GridSaveChanges).Replace("#", "\\#"))

but it does not work.

2 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 10 Jul 2017, 03:36 PM
Hello Alexandra,

The other thread discusses a case, where the German umlaut is inside a ClientTemplate definition. If you are directly creating a template in JavaScript, you need to ensure that special symbols are escaped before passing the text to the template, as explained here:
Hash Literals
If the above article does not help, could you show the exact code that you use to create your template, so I can give you more specific suggestions to try?

Regards,
Tsvetina
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Alexandra
Top achievements
Rank 1
answered on 14 Jul 2017, 08:47 AM

Hi Tsvetina,

Thank you for response. Indeed Html.Raw works. I was displaying something from a model property and did not realize that was coming also from resources. I manage to "solve" my issue by printing the template before rendering and saw there the # character that was not escaped.

Tags
Grid
Asked by
Alexandra
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Alexandra
Top achievements
Rank 1
Share this question
or