Skip to content

Can't seem to handle German umlauts.... #276

Closed
dotnet/arcade
#16884

Description

@marcscheuner-bfh

I have a template that shows German first and last names - something like

{{firstname}} {{lastname}}

If I provide a name like firstname="Peter", lastname="Müller", I get this in my result string:

Peter Müller

Is there any way in Handlebars.NET to AVOID this encoding? I just want the normal text "Peter Müller" back, since I need this inside an e-mail template.......

Activity

  1. rexm commented on Dec 10, 2018

    @rexm
    Member

    Generally e-mail clients handle encoded characters better than the expanded character sets. It is possible to introduce your own encoder that doesn't do this, on the Configuration object, but I'd wonder why for e-mail.

  2. tonysneed commented on Dec 27, 2018

    @tonysneed

    This is an issue for my Handlebars scaffolding for EF Core, which in general should suppress HTML encoding.

    I noticed that EncodedTextWriter has a SuppressEncoding property. Would it be possible to add this property to HandlebarsConfiguration, so that HTML encoding could be suppressed?

  3. tonysneed commented on Dec 28, 2018

    @tonysneed

    @rexm If you point me in the right direction, I can submit a PR for this.

  4. rexm commented on Apr 27, 2019

    @rexm
    Member

    HandlebarsJS has a configuration option noEscape that disables all encoding. I think a NoEscape boolean on configuration that controls/overrides the EncodedTextWriter would be appropriate.

  5. marcscheuner-bfh commented on Apr 29, 2019

    @marcscheuner-bfh
    Author

    @rexm : yes, sounds very reasonable and would increase the usefulness of Handlebars.NET - you definitely got my vote on this one!

  6. tonysneed commented on Jul 17, 2019

    @tonysneed

    👍 For adding this fix to the next version of Handlebars.NET.

  7. tonysneed commented on Oct 27, 2020

    @tonysneed

    Is there now a NoEscape boolean on configuration?

  8. oformaniuk commented on Oct 28, 2020

    @oformaniuk
    Member

    Yes, it is available in latest master. Unfortunately it is not yet published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions