Solr
  1. Solr
  2. SOLR-194

SimplePostTool uses hardcoded UTF-8 encoding to read files

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: clients - java
    • Labels:
      None

      Description

      Using

      java -Dfile.encoding=iso-8859-1 -jar post.jar http://localhost:8983/solr/update utf8-example.xml

      posts incorrect data, apparently utf8-example.xml is read using the JVM's encoding.

      As a workaround before we fix this, use

      java -Dfile.encoding=UTF-8 -jar post.jar http://localhost:8983/solr/update utf8-example.xml

      1. post.jar
        5 kB
        Bertrand Delacretaz

        Issue Links

          Activity

          Bertrand Delacretaz created issue -
          Bertrand Delacretaz committed 520817 (1 file)
          Reviews: none

          SOLR-194: use fixed UTF-8 encoding to read the files to POST

          Hide
          Bertrand Delacretaz added a comment -

          The above problem is fixed in revision 520817 by hardcoding the UTF-8 encoding to read files.

          We'll need to use a the XML parser to read these files cleanly, especially once SOLR-190 is fixed.

          Show
          Bertrand Delacretaz added a comment - The above problem is fixed in revision 520817 by hardcoding the UTF-8 encoding to read files. We'll need to use a the XML parser to read these files cleanly, especially once SOLR-190 is fixed.
          Bertrand Delacretaz made changes -
          Field Original Value New Value
          Link This issue relates to SOLR-190 [ SOLR-190 ]
          Hide
          Bertrand Delacretaz added a comment -

          Both issues will need to be fixed in order to post non UTF-8 documents using the SimplePostTool

          Show
          Bertrand Delacretaz added a comment - Both issues will need to be fixed in order to post non UTF-8 documents using the SimplePostTool
          Bertrand Delacretaz made changes -
          Summary SimplePostTool incorrectly uses the current JVM encoding to read files SimplePostTool uses hardcoded UTF-8 encoding to read files
          Hide
          Bertrand Delacretaz added a comment -

          Includes the fix of revision 520817

          Show
          Bertrand Delacretaz added a comment - Includes the fix of revision 520817
          Bertrand Delacretaz made changes -
          Attachment post.jar [ 12353834 ]
          Hide
          Shalin Shekhar Mangar added a comment -

          Per the comments above, this issue has been fixed already.

          Show
          Shalin Shekhar Mangar added a comment - Per the comments above, this issue has been fixed already.
          Shalin Shekhar Mangar made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Bertrand Delacretaz
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development