Script Runner - International characters in files won't load

I'm using Script Runner to launch a script post-function.

In the script there is several international characters such as "é"

My Linux box uses "ANSI_X3.4-1968" system enconding.

With Notepad++

  • if I encode the file in UTF8, the script won't load.
  • if I encode the file in AINSI, the script loads but the "é" appears as gibberish

Now, if I run the script on a JIRA instance on Windows, the System file encoding is "Cp1252" and:

  • if I encode the file in UTF8, the script won't load.
  • if I encode the file in AINSI, the script loads and "é" appears "é"

Which leads me to my question.

What can I do to make the script work on my Linux box. Do I need to change the system encoding, or is there JVM attribute I can add to setenv.sh ?

Thanks

2 answers

1 accepted

This widget could not be displayed.

It didn't work for me when encoded as UTF-8 with or without a BOM. With ANSI it did work but then I couldn't edit it in IDEA. With linux my script worked when pasting it in to the admin panel. Maybe related: http://groovy.329449.n5.nabble.com/Does-Groovy-support-UTF-8-encoded-scripts-td331787.html

As a (bad) workaround perhaps you could html-escape them, if displaying in the browser? Likely not possible though.

Setting -Dfile.encoding=UTF-8 may work... not tested.

This widget could not be displayed.

I replaced "é" by "\u00e9" and it worked.

Thanks Jamie

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

534 views 3 19
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you