Skip to main content
Participating Frequently
December 19, 2024
Answered

Encoding issue while saving data into node in aem

  • December 19, 2024
  • 2 replies
  • 192 views

Hi All,

Currently working on "us/sc" locale & while doing the authering of page component by programaticaly getting utf/encodng issue , for example:  if i try to save this data "

享受主厨 Ron 的菲式煎牛肉" into text component it's saving like that "<p>鲜嫩的西冷牛排ã€�香烤大蒜和热米饭混å�ˆåœ¨ä¸€èµ·ï¼Œåˆ¶ä½œæ–¹ä¾¿ï¼Œå�£æ„Ÿæ›´ä½³ã€‚å®¶ä¹�牌®鲜露以熟悉而令人愉悦的鲜味为è�œè‚´é”¦ä¸Šæ·»èŠ±ã€‚</p>" 
 
Scrrnshot for refence

 

 Try to apply encoding as well:  "

byte[] utf8Bytes = textProp.getBytes(StandardCharsets.UTF_8);
String utf8EncodedString = new String(utf8Bytes, StandardCharsets.UTF_8);" 
in logs this is proper string reading & writing but in JCR stored in wrong format. 
 
Note:
componentNode.setProperty("jcr:title", titleProp.toString()); if i do hardcoded hear it worked. 
 
 
Lookig for any kind of suggetion & help.
 
Thanks,
Vishal Bansal
This topic has been closed for replies.
Correct answer Peru Bob

This is the wrong forum.

You need to post that here:

https://experienceleaguecommunities.adobe.com/

2 replies

kglad
Community Expert
Community Expert
December 19, 2024

in the future, to find the best place to post your message, use the list here, https://community.adobe.com/

p.s. i don't think the adobe website, and forums in particular, are easy to navigate, so don't spend a lot of time searching that forum list. do your best and we'll move the post (like this one has already been moved) if it helps you get responses.



<"moved from using the community">
Peru Bob
Community Expert
Peru BobCommunity ExpertCorrect answer
Community Expert
December 19, 2024

This is the wrong forum.

You need to post that here:

https://experienceleaguecommunities.adobe.com/