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

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
Community showcase
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,431 views 0 8
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