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 Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,926 questions
0 comments No comments
{count} votes

Accepted answer
  1. AmanpreetSingh-MSFT 56,666 Reputation points
    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.


2 additional answers

Sort by: Most helpful
  1. 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.

    0 comments No comments

  2. 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

    0 comments No comments

Your answer

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