It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Locales on Bitbucket Pipelines Edited

Hi,

when I start a pipeline (using openjdk:8 as image) I get an error due to a filename that contains UTF8 chars (this process runs smoothly on my local machine).

java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: javaslang/?.class
at sun.nio.fs.UnixPath.encode(UnixPath.java:147)
at sun.nio.fs.UnixPath.<init>(UnixPath.java:71)
at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281)
at sun.nio.fs.AbstractPath.resolve(AbstractPath.java:53)
at org.owasp.dependencycheck.analyzer.ArchiveAnalyzer.extractArchive(ArchiveAnalyzer.java:536)
at org.owasp.dependencycheck.analyzer.ArchiveAnalyzer.extractFiles(ArchiveAnalyzer.java:409)
at org.owasp.dependencycheck.analyzer.ArchiveAnalyzer.extractAndAnalyze(ArchiveAnalyzer.java:251)

Unfortunately, a Kotlin core dependency does contain a file called "λ.class" that can't be opened via Java with the current locale configuration. Tools like "locale-gen" are not present and specifying env variables didn't help. I did try with all of those:

LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"

Is there another way to change the locale using bitbucket pipelines in order to read filenames with UTF8 encoded names?

Thanks

2 answers

1 accepted

0 votes
Answer accepted

Hi @jcorzani

try passing these arguments to the invocation of your Java app or tests: `-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8`

Empty message that I couldn't delete :)

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,052 views 0 3
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you