FileInputPlugin causes InvalidPathException by using Japanese filename
See original GitHub issueFileInputPlugin causes InvalidPathException by using Japanese filename (e.g. ほげ.csv). It seems that it’s influenced by the locale LANG.
vagrant@debian:~/docker-embulk$ docker exec test-embulk cat /var/log/cron.log
2017-03-31 13:56:05.856 +0000: Embulk v0.8.18
java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: ??????
at sun.nio.fs.UnixPath.encode(sun/nio/fs/UnixPath.java:147)
at sun.nio.fs.UnixPath.<init>(sun/nio/fs/UnixPath.java:71)
at sun.nio.fs.UnixFileSystem.getPath(sun/nio/fs/UnixFileSystem.java:281)
at java.nio.file.Paths.get(java/nio/file/Paths.java:84)
at org.embulk.standards.LocalFileInputPlugin.listFiles(org/embulk/standards/LocalFileInputPlugin.java:107)
at org.embulk.standards.LocalFileInputPlugin.transaction(org/embulk/standards/LocalFileInputPlugin.java:63)
at org.embulk.spi.FileInputRunner.transaction(org/embulk/spi/FileInputRunner.java:65)
at org.embulk.exec.SamplingParserPlugin.runFileInputSampling(org/embulk/exec/SamplingParserPlugin.java:34)
at org.embulk.exec.PreviewExecutor.doPreview(org/embulk/exec/PreviewExecutor.java:96)
at org.embulk.exec.PreviewExecutor.access$000(org/embulk/exec/PreviewExecutor.java:30)
at org.embulk.exec.PreviewExecutor$1.run(org/embulk/exec/PreviewExecutor.java:70)
at org.embulk.exec.PreviewExecutor$1.run(org/embulk/exec/PreviewExecutor.java:66)
at org.embulk.spi.Exec.doWith(org/embulk/spi/Exec.java:25)
...
I’m assuming to use this on docker container. As a workaround, I am setting locale to docker. But I don’t want platfrom settings comprecated.
Paths#get
seems to cause Exception, do you have some way to fix it?
public List<String> listFiles(PluginTask task)
{
Path pathPrefix = Paths.get(task.getPathPrefix()).normalize();
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Image uploader, formats file names when sending ... - GitHub
I was expecting that the filename as sent for AJAX uploads is consistent with the filename (input value) when doing form submissions. Or...
Read more >bootstrap 4 file input doesn't show the file name - Stack Overflow
I have a problem with the custom-file-input class in Bootstrap 4. after I chose which file I want to upload the filename do...
Read more >Bootstrap File Input - © Kartik - Krajee JQuery Plugins
The plugin allows you a simple way to setup an advanced file picker/upload control built to work specially with Bootstrap CSS3 styles. It...
Read more >bs-custom-file-input - npm
A little plugin which makes Bootstrap 4 custom file input dynamic with no dependencies. You can use it on React and Angular too...
Read more >Nice Clean File Input Plugin With jQuery and Bootstrap 5/4/3
js. purify: Needed if you wish to purify HTML content in your preview for HTML files. This must be loaded before fileinput.min.js.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This problem was caused by cron. 😅 cf. http://www.mk-mode.com/octopress/2013/11/26/linux-cron-locale-behavior/ (japenese)
This issue is also same behavior.
As a result, I have to set locale in Dockerfile… Thank you for your help! 🙇♂️
Thank you for sharing your knowledge!