Kenneth Johansson wrote: > This is perhaps a little bit off topic, but it relates to XXE. We are > saving our xml-documents in windows-1252, but some of our writers have > written documents using other encodings. I've missed to create a > saveOptions command in our xxe config file. > > How do I change the encoding from e.g. ISO-8859-1, or UTF-8 to > windows-1252? Do you know of an application that can do this conversion?
The easiest way to do this would be to reopen the files in XXE and to save them using the same file names. This is not practical if you have dozens of such files, therefore I've written a command line utility for you. See attached files. usage: java -jar recode.jar from_encoding to_encoding xml_file ... xml_file Example: java -jar recode.jar UTF-8 Windows-1252 book.xml chapter1.xml chapter2.xml chapter3.xml --- PS: Standard Java utility "native2ascii -reverse" will *not* do the job. -------------- next part -------------- A non-text attachment was scrubbed... Name: recode.jar Type: application/octet-stream Size: 2239 bytes Desc: not available Url : http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20041103/0a6de11f/attachment.dll -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Recode.java Url: http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20041103/0a6de11f/attachment.bat -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: build.sh Url: http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20041103/0a6de11f/attachment-0001.bat

