[ ENV ]
OS: Windows 10 Pro 1909
System Locale: zh-tw;Chinese (Taiwan)
JRE: OpenJDK Runtime Environment (build 1.8.0_275-b01)
Free Spire.Office for Java (3.9.0)
[ Error ]
- Code: Select all
Exception in thread "main" class com.spire.office.packages.sprhmD: 'MS950' is not a supported encoding
com.spire.office.packages.sprljd.spr (hqc:386)
com.spire.office.packages.sprLLe.spr♦ (Unknown Source)
com.spire.office.packages.sprLLe.spr (Unknown Source)
com.spire.office.packages.sprLLe.spr (Unknown Source)
com.spire.office.packages.sprLLe.spr (Unknown Source)
com.spire.doc.fields.TextRange.spr (Unknown Source)
com.spire.office.packages.sprqce.spr (Unknown Source)
com.spire.office.packages.sprqce.spr (Unknown Source)
com.spire.office.packages.sprqce.spr♦ (Unknown Source)
com.spire.office.packages.sprqce.spr (Unknown Source)
com.spire.office.packages.sprqce.spr (Unknown Source)
com.spire.office.packages.sprMDe.spr☺ (Unknown Source)
com.spire.office.packages.sprMDe.spr (Unknown Source)
com.spire.office.packages.sprMDe.spr☺ (Unknown Source)
com.spire.office.packages.sprMDe.spr (Unknown Source)
com.spire.office.packages.sprjBe.spr (Unknown Source)
com.spire.office.packages.spreLe.spr (Unknown Source)
com.spire.office.packages.spreLe.spr♣ (Unknown Source)
com.spire.office.packages.spreLe.spr♦ (Unknown Source)
com.spire.office.packages.sprGTe.spr (Unknown Source)
com.spire.doc.Document.spr (Unknown Source)
com.spire.doc.Document.saveToImages(Unknown Source)
I've found the root cause might have something to do with system locale, which was "Chinese (Traditional, Taiwan)" on my computer. If I change it to other value like "English (United States)", the program can be executed successfully.
The problem is that I have no idea how to solve this programmatically using the API you developed.
Attached is one of the files which caused the Exception.
Thanks.