6

I am trying to retrieve Arabic Content for my website. I am able to save the content in CMS and also able to publish it to Broker correctly. When I am trying to access it from my .NET DXA Application, some characters are getting replaced by '?'

I have done the below mappings: In Master Layout File:

<meta http-equiv="Content Type" content="text/html; charset=UTF-8" />

In Application Web.Config:

<globalization resourceProviderFactoryType="Sdl.Web.Mvc.Configuration.ResourceProviderFactory, Sdl.Web.Mvc" fileEncoding="UTF-8" requestEncoding="UTF-8" responseEncoding="UTF-8"/>

In Deployer and Discovery Services cd_storage_conf.xml file:

<Role Name="DeployerCapability" Url="http://localhost:8084/httpupload">
     <Property Name="undo.enabled" Value="false"/>
     <Property Name="encoding" Value="UTF-8"/>
</Role> 

I restarted the Deployer Service, Registered the Discovery Service, and restarted it again.

I am not sure if I am missing anything. Currently, I am using SDL Web 8.1 & DXA 1.5

To add further, please find the original Arabic Text, and the Response Arabic Text.

Original Arabic Text:

مبادرة بيرل تكرم (سابك) لقيادتها ومساهمتها البارزة في تعزيز ممارسات الحوكمة والاستدامة في منطقة الخليج

Response Arabic Text:

مبادرة بيرل تكرم (سابك) لقيادتها ومساهمتها البارزة �?ي تعزيز ممارسات الحوكمة والاستدامة �?ي منطقة الخليج

This issue is coming for the Components Published with Dynamic Component Templates. For Component Presentations Embedded on the Page, the Arabic text is coming absolutely fine now.

Please help.

  • Can you edit your question and supply a bit more detail which settings you changed exactly, and also which version of Web 8 you are exactly using? – Bart Koopman Nov 4 '16 at 8:17
  • 1
    @Bart: Edited the question with all the details. – Sharad Kumar Sangal Nov 4 '16 at 8:27
  • 1
    This is quite odd, I've had no problems with this except when the deployer was misconfigured, which is not the case for you – Nuno Linhares Nov 5 '16 at 19:59
  • @Nuno: I checked in DB. The Characters are getting stored correctly. The issue is not, when the .NET DXA Application retrieves the characters. Most of them are coming correctly, only very few are coming as '?' – Sharad Kumar Sangal Nov 7 '16 at 8:51
  • 1
    @Bart: I am trying various options, but now kind of stuck in Dynamic Component Presentations. Will Keep looking into it, and also looking forward for any help from Community. – Sharad Kumar Sangal Nov 10 '16 at 11:23
3

Please try adding the following file.encoding Java System Property to the installation script. For example, for installService.ps1:

$jvmoptions = "-Xrs", "-Xms256m", "-Xmx256m", "-Dfile.encoding=UTF-8"

There's currently an issue in that the Deployer ignores the encoding property set within the Role configuration.

You will also need to reinstall the service on Windows platforms after making this change.

  • Thanks Bengineer!!!! It resolved the issue for Dynamic Presentations as well. – Sharad Kumar Sangal Nov 15 '16 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.