Issue Details (XML | Word | Printable)

Key: MIDEA-89
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dennis Lundberg
Reporter: Kohsuke Kawaguchi
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Maven 2.x IDEA Plugin

iml file generation done in the platform encoding, not UTF-8

Created: 28/Apr/07 01:46 PM   Updated: 08/Mar/08 01:46 PM
Component/s: None
Affects Version/s: 2.0
Fix Version/s: 2.2

Time Tracking:
Not Specified


 Description  « Hide
When *.iml files are generated, characters are apparently encoded in the platform default encoding. This is inconsistent with the XML declaration placed in these files, which say UTF-8. So the resulting project files don't load correctly when some of the pathnames contain non-ASCII characters.

I bet somewhere in the code you are doing just "new OutputStreamWriter(new FileOutputStream(...))" kind of things. Please change the code to use UTF-8.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Dennis Lundberg added a comment - 14/Jul/07 06:03 PM
I found this code in the class IdeaXmlWriter, that is used to write all files for this plugin.
new FileWriter( file )

Would it be correct to change this to:

new OutputStreamWriter( new FileOutputStream( file ), "UTF-8" )

Can you provide a sample pom.xml file that I can use for testing?


Kohsuke Kawaguchi added a comment - 17/Dec/07 01:36 PM
Yes. That's it. Thanks!

Dennis Lundberg added a comment - 08/Mar/08 01:46 PM
A new SNAPSHOT has been deployed with a fix for this. Please verify that it works.