daml assistant: Reading from input files fails with non-ASCII characters.
See original GitHub issueWhen trying to run daml script
with an input file in UTF-8 encoding that contains non-ASCII characters in a Text
-typed field, it prints the following to the console and does nothing else (but doesn’t exit either):
Exception in thread "main" java.nio.charset.MalformedInputException: Input length = 1
at java.nio.charset.CoderResult.throwException(CoderResult.java:281)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.read1(BufferedReader.java:210)
at java.io.BufferedReader.read(BufferedReader.java:286)
at java.io.Reader.read(Reader.java:140)
at scala.io.BufferedSource.mkString(BufferedSource.scala:98)
at com.daml.lf.engine.script.RunnerMain$.$anonfun$main$3(RunnerMain.scala:71)
at scala.Option.map(Option.scala:230)
at com.daml.lf.engine.script.RunnerMain$.main(RunnerMain.scala:68)
at com.daml.sdk.SdkMain$.main(SdkMain.scala:21)
at com.daml.sdk.SdkMain.main(SdkMain.scala)
DAML version: 1.2.0-snapshot.20200527.4268.0.acc5a21c
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Error Codes — Daml SDK 2.4.2 documentation
OUT_OF_RANGE is a special case for reading past a range. Violations of the Daml ledger model always result in these kinds of errors....
Read more >Pyyaml not reading (non-ascii) character correctly ("§")
I have the following file ( sample.
Read more >file-20: Errors for non-ascii characters
Problem Symptoms: Errors when non-ascii characters (for foreign student names/addresses) are present when attempting to load plif (p_file_20) ...
Read more >Release of Daml SDK 1.0 - Digital Asset Blog
The new Sandbox has a known issue where some false negative contract key lookups are only correctly validated on the read path, not...
Read more >System Event Log (SEL) - Troubleshooting Guide - Intel
Added ECC error event define for Intel® Xeon® processor scalable family. ... [3:0] – Offset from Event/Reading Code for discrete event state. Event...
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 Free
Top 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
Glad you got it working! I’ll see if we can just always default to utf-8. Reading files depending on locale is almost never useful ime.
That was it. I had selected a nonexistent locale in KDE (please don’t ask me why that is possible in the first place), so DAML fell back to the
C
one, which does not support UTF-8.