Skip to main content
Participant
October 22, 2021
Answered

Issue using Addwatermarkfromtext with copyright symbol in cText

  • October 22, 2021
  • 1 reply
  • 960 views

I have run into a problem when using the addwatermarkfromtext.

 

I have used the method many times, but now I have been asked to add stamp with a copyright statement with "©" symbol in the cText field. When testing from the Javascript console it works perfectly, but when I save it as a .js file and run it as a folder level script (script at bottom) I get: Copyright thisCompany Â©

 

The issue is the added character "Â"

 

I have tried changing fonts a few times but I get the same issue. Searching for people with this issue but I have found no solution. 

 

Hopefully someone here can bestow some wisdom upon me.

 

this.addWatermarkFromText({
cText: 'Copyright thisCompany © ',

nStart: i,
nEnd: i,
nTextAlign: app.constants.align.left,
nVertAlign: app.constants.align.bottom,
nHorizAlign: app.constants.align.center,
nVertValue: -0.55,
cFont: "KozGoPr6N-Medium",
nFontSize: 30,
aColor: color.black,
Opacity: 1,
nScale: -0.75
});

This topic has been closed for replies.
Correct answer try67

Works fine for me. Make sure you use an editor where you can set the encoding, such as Notepad++, and set it to ANSI.

Alternatively, you can use the unicode escape character, like this:

 

cText: 'Copyright thisCompany \u00A9 ',

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
October 22, 2021

Works fine for me. Make sure you use an editor where you can set the encoding, such as Notepad++, and set it to ANSI.

Alternatively, you can use the unicode escape character, like this:

 

cText: 'Copyright thisCompany \u00A9 ',

Participant
October 22, 2021

Thanks for the fast reply, this solution worked perfectly!