Skip to main content
New Participant
July 15, 2021

Spanish characters in data.xml from AEM forms submission cannot be recognized on publisher

  • July 15, 2021
  • 11 replies
  • 2707 views

We have an AEM 6.5.8 form display in Spanish and works fine for submission as well, all the fields with spanish character in data.xml are working fine:

{"afData": {"afBoundData": {"data": {"latamInfo": {"topMarginContainer": {"nasNo": "5007699", "reportNo": "ü, é, á, í, ó, ú, ñ, Ñ, ¿, ¡, Á, É, Í, Ó, Ú, Ü"...

 

However, the same code and form when replicate to publish server, I got this when submit:

{"afData":{"afBoundData":{"data":{"latamInfo":{"topMarginContainer":{"nasNo":"5007699","reportNo":"�, �, �, �, �, �, �, �, �, �, �, �, �, �, �, �"...

 

Why the exact same form and code behave different on author and publisher?

 

 

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

11 replies

ChitraMadan
New Participant
July 16, 2021

Hi @davidzhang,

 

You can try below options as well:

 

1) Try to set encoding in the form using accept-charset

<form name="formname"  method="post" accept-charset="UTF-8" enctype="multipart/form-data" action="WHATEVER">

 

2) If you are using Servlet, you can set encoding in the response header

 

response.setCharacterEncoding(CharEncoding.UTF_8);

 

 

Thanks,

Chitra

New Participant
July 16, 2021
I am using AEM forms, From where I can set the accept-charset or change response? I checked the my form properties and form container properties, there's no where I can set it. It's not java or HTML coding.
Employee
July 16, 2021

@davidzhang ,

 

Can you try this  :

  • Go to http://aemhost /system/console/configMgr/org.apache.sling.engine.parameters and log in as admin on publish and author

  • Set Default Parameter Encoding to UTF-8

  • Click Save

     

    Hope this helps!

    Thanks

New Participant
July 16, 2021
It's already utf-8, even just lower case for both author and publisher. Author works fine, not publisher.
New Participant
July 15, 2021

Even restarted publisher server to make sure no cache issue. Still the same result.