Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

Encoding issue while saving data into node in aem

Explorer ,
Dec 18, 2024 Dec 18, 2024

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
Vishal30347527d76p_0-1734590791109.png

 

 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
228
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 19, 2024 Dec 19, 2024

This is the wrong forum.

You need to post that here:

https://experienceleaguecommunities.adobe.com/

Translate
Community Expert ,
Dec 19, 2024 Dec 19, 2024

This is the wrong forum.

You need to post that here:

https://experienceleaguecommunities.adobe.com/

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 19, 2024 Dec 19, 2024
LATEST

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">
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines