Spring Tool Suite
  1. Spring Tool Suite
  2. STS-3465

Quick Text Search find nothing with cyrillic search string (UTF-8)

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.0.RELEASE
    • Fix Version/s: 3.4.0.M1
    • Component/s: None
    • Labels:
      None

      Description

      Source file encoding: UTF-8
      screenshot example https://www.dropbox.com/s/fbw4q7klifehrxi/QickSearch2.png

        Activity

        Hide
        Kris De Volder (c) added a comment - - edited

        Hi Mikhail,

        I might take a look at fixing this if you could make it a little easier to reproduce.
        My problem is... I don't really use Cyrilic and not even sure how to type cyrilics.
        So hard to test.

        Could you attach a UTF text or source file with some Cyrilics in it?

        With that it be easy for me to select snippets in the file and search them. Then debug.

        Thanks,

        Kris

        Show
        Kris De Volder (c) added a comment - - edited Hi Mikhail, I might take a look at fixing this if you could make it a little easier to reproduce. My problem is... I don't really use Cyrilic and not even sure how to type cyrilics. So hard to test. Could you attach a UTF text or source file with some Cyrilics in it? With that it be easy for me to select snippets in the file and search them. Then debug. Thanks, Kris
        Hide
        Mikhail Denisov added a comment - - edited

        // UTF-8 (cyrillic) example

        class UtfExample {

        // field
        private String атрибут

        // method
        void метод(String параметер)

        { // comment // комментарий }

        }

        // class
        class класс {

        }

        Show
        Mikhail Denisov added a comment - - edited // UTF-8 (cyrillic) example class UtfExample { // field private String атрибут // method void метод(String параметер) { // comment // комментарий } } // class class класс { }
        Hide
        Kris De Volder (c) added a comment -

        Finally I got around to trying this. But I cannot reproduce the problem.

        I took the file put it a project and searched for some text snippets with Cyrillics and it works for me.

        My guess is that this is probably a platform / locale specific problem. Somewhere there are probably some calls in the code that aren't passing the 'encoding' to some of the Java file and io apis. But in my environment the default encoding is probably UTF-8 and so things work out for me.

        Probably if you are hitting the bug your default encoding ends up something else and the problem arises.

        This is really a bug that should be fixed... but maybe there's a workaround for now... can you please try adding:

        -Dfile.encoding=UTF8

        to your eclipse.ini file?

        Show
        Kris De Volder (c) added a comment - Finally I got around to trying this. But I cannot reproduce the problem. I took the file put it a project and searched for some text snippets with Cyrillics and it works for me. My guess is that this is probably a platform / locale specific problem. Somewhere there are probably some calls in the code that aren't passing the 'encoding' to some of the Java file and io apis. But in my environment the default encoding is probably UTF-8 and so things work out for me. Probably if you are hitting the bug your default encoding ends up something else and the problem arises. This is really a bug that should be fixed... but maybe there's a workaround for now... can you please try adding: -Dfile.encoding=UTF8 to your eclipse.ini file?
        Hide
        Kris De Volder (c) added a comment -

        Able to reproduce problem now. Just did the 'inverse workaround' by adding

        -Dfile.encoding=ISO-8859-1

        This makes the bug happen on my Platform as well.

        Show
        Kris De Volder (c) added a comment - Able to reproduce problem now. Just did the 'inverse workaround' by adding -Dfile.encoding=ISO-8859-1 This makes the bug happen on my Platform as well.
        Hide
        Kris De Volder (c) added a comment -

        Fix pushed. closing issue.

        Show
        Kris De Volder (c) added a comment - Fix pushed. closing issue.

          People

          • Assignee:
            Kris De Volder (c)
            Reporter:
            Mikhail Denisov
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date: