Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Veronica Burd 7 posts 118 karma points
    May 16, 2018 @ 13:35
    Veronica Burd

    UTF 8 characters in media file names


    I have a large number of documents in the media section that use unicode characters e.g. ċ, ġ, ħ and ż. Umbraco lets my users upload these without issue. However, when I try to render a link via razor those characters are being replaced by andNNN where NNN is the numeric code for the character. That is, a filename like this


    is rendered as:


    Here's the code I'm using to render the link:

    @if (@Model.Content.HasValue("document"))
      IPublishedContent doc = Model.Content.GetPropertyValue<IPublishedContent>("document");
      <div class="table-responsive">
        <table class="col-md-12 table table-striped table-bordered">
              <td class="col-md-3 col-xs-6">&nbsp;</td>
              <td class="col-md-9 col-xs-6"><a href="@doc.Url" target="_blank">@Umbraco.Field("#Download.Document")</a></td>

    I've tried turning off Ascii replacements in URL via umbracoSettings.config

    <urlReplacing removeDoubleDashes="true" toAscii="false">

    but this doesn't seem to have had any effect on this issue and right now I'm at a loss as to where the problem is occurring. Is it my code, umbraco config, or maybe an IIS setting?



Please Sign in or register to post replies

Write your reply to: