java.nio.charset.UnmappableCharacterException: Input length = 1



Full error message:



java.nio.charset.UnmappableCharacterException: Input length = 1
at java.nio.charset.CoderResult.throwException(CoderResult.java:261)
at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:266)
at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:106)
at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:116)
at java.io.Writer.write(Writer.java:140)
at scala.xml.XML$.write(XML.scala:108)
at scala.xml.XML$$anonfun$save$2.apply$mcV$sp(XML.scala:91)
at scala.xml.XML$$anonfun$save$2.apply(XML.scala:91)
at scala.xml.XML$$anonfun$save$2.apply(XML.scala:91)
at scala.util.control.Exception$Catch.apply(Exception.scala:102)
at scala.xml.XML$.save(XML.scala:90)
at agent.Main$$anonfun$2.apply$mcV$sp(Main.scala:32)


My code at Main Line 32:



scala.xml.XML.save(nameBuilder(),file)


What do I need to change here? Are there unprintable characters in the file?


Thanks in advance


No comments:

Post a Comment