GWT: Character encoding umlauts

后端 未结 5 1147
后悔当初
后悔当初 2021-01-12 04:24

I want to set a text in a label:

labelDemnaechst.setText(\" Demnächst fällig:\");

On the output in the application the characters \"ä\" are

5条回答
  •  日久生厌
    2021-01-12 05:08

    To get UTF-8 encoding for your entire workspace, go to Window -> Preferences. In the pop-up start typing encoding. Now you should have Content Types, Workspace, CSS Files, HTML Files, XML Files as result. In content Types you can type UTF-8 in the Default encoding text box, for the other elements you can just select the encoding in their respective listboxes.

    Then check the encoding for your project in Project -> Properties -> Resource.

    Detailed instruction with pictures can be found here:

    http://stijndewitt.wordpress.com/2010/05/05/unicode-utf-8-in-eclipse-java/

    Cheers

提交回复
热议问题