Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Locales on Bitbucket Pipelines

jcorzani
Contributor
May 9, 2019

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
Jeroen De Raedt
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 9, 2019

Hi @jcorzani

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

jcorzani
Contributor
July 29, 2019
0 votes
jcorzani
Contributor
July 29, 2019

Empty message that I couldn't delete :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events