Maven IDEA Plugin (RETIRED)
  1. Maven IDEA Plugin (RETIRED)
  2. MIDEA-89

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

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.2
    • Labels:
      None
    • Number of attachments :
      0

      Description

      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.

        Activity

        Hide
        Dennis Lundberg added a comment -

        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?

        Show
        Dennis Lundberg added a comment - 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?
        Hide
        Kohsuke Kawaguchi added a comment -

        Yes. That's it. Thanks!

        Show
        Kohsuke Kawaguchi added a comment - Yes. That's it. Thanks!
        Hide
        Dennis Lundberg added a comment -

        A new SNAPSHOT has been deployed with a fix for this. Please verify that it works.

        Show
        Dennis Lundberg added a comment - A new SNAPSHOT has been deployed with a fix for this. Please verify that it works.

          People

          • Assignee:
            Dennis Lundberg
            Reporter:
            Kohsuke Kawaguchi
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: