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

1 vote

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.

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

Thanks Jamie

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published 4 hours ago in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

26 views 0 2
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