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

Why is Extendscript Layer Text generating  when placing a faction like ¾

New Here ,
Jan 16, 2025 Jan 16, 2025

I have an extendscript javascript script that has been working for 2 years, that reads from a UTP-8 XML file and fills in the text on the correct layers in Photoshop that worked on 25.9.1 On changing to 25.12.1 This now adds Â before the ¾.

 

I am using ¾ as the HTML entity in the XML file to add in the fraction. This happens on any fractions I use, but not on & or '.

 

Does anyone know why this is happening or what has changed? Or better yet how to fix it.

TOPICS
Actions and scripting
793
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
Adobe
Community Expert ,
Jan 16, 2025 Jan 16, 2025

The easiest solution (or rather work-around) might be to remove all »Â«-s from the string before filling a layer. 

IF that is not a letter used in the text’s language, that is. 

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
New Here ,
Jan 17, 2025 Jan 17, 2025
LATEST

I thought this was a great solution, but Extendscript doesn't want to replace this character. I have tested with other words using the same script and it works fine. Just not with this character

Here is the code, any thoughts would be great

function updateText(parentlayer, lyrName, textContents){
    layer = selectLayer(parentlayer, lyrName);
    if(layer != undefined)
    {        layer.textItem.contents = textContents.replace(/Â/g, '');
       
    }
}
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