Share via

Problem with encoding for supporting foreign characters in translation

Anders Madsen 86 Reputation points
2020-11-16T09:51:45.257+00:00

We have a problem with some of the translations added to our custom policy. The translations are added correctly in our custom policy with all characters being displayed correctly in the file. The file has the UTF-8 encoding.
For some reason, translations with special characters such as ç are displayed HTML encoded, but only in the label of the email field. We don't have any JS active that creates this behavior. Is this just a bug in B2C?

Lines in custom policy:
<LocalizedString ElementType="UxElement" StringId="logonIdentifier_username">Endereço de Email</LocalizedString>
<LocalizedString ElementType="ClaimType" ElementId="signInName" StringId="DisplayName">Endereço de Email</LocalizedString>

The translation is in pt-br (Portuguese Brazilian).

40037-screenshot-2020-11-16-at-103739.png

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
0 comments No comments

Answer accepted by question author

AmanpreetSingh-MSFT 56,966 Reputation points Moderator
2020-11-16T12:09:10.447+00:00

Hi @Anders Madsen · Thank you for reaching out.

I tested using the string Endereço de Email in my B2C custom policy (policy url) but couldn't reproduce the issue. The only issue I am aware of is with the <DataUri>urn:com:microsoft:aad:b2c:elements:contract:unifiedssp:2.1.0</DataUri> under <ContentDefinition Id="api.signuporsignin"> which doesn't translate certain strings and to translate those strings, unifiedssp:1.1.0 has to be used as of now.

You may try switching page layout version from unifiedssp:2.1.0 to unifiedssp:1.1.0 if that helps. Please refer to https://learn.microsoft.com/en-us/azure/active-directory-b2c/page-layout to identify the difference between various page layout versions.

-----------------------------------------------------------------------------------------------------------

Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

Was this answer helpful?


2 additional answers

Sort by: Most helpful
  1. Octopus 121 Reputation points
    2021-01-26T09:57:16.793+00:00

    And unfortunately it seems I cannot use the 1.1.0 layout version, the only available are 2.1.0 and 2.1.1

    Was this answer helpful?

    0 comments No comments

  2. Octopus 121 Reputation points
    2021-01-26T09:46:05.91+00:00

    @AmanpreetSingh-MSFT I have the same problem I believe, here https://learn.microsoft.com/en-us/answers/questions/245412/azure-b2c-languages-bug.html .
    I am using the builtin userflow.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.