Eclipse-RCP Wrong encoding when deploying the product

前端 未结 3 1540
忘了有多久
忘了有多久 2021-02-05 20:08

I am creating an RCP application, with many Greek messages, so everything is in UTF-8. As I develop and test through Eclipse IDE, everything is fine.

When I am deploying

3条回答
  •  遇见更好的自我
    2021-02-05 20:22

    The trick is to start the Eclipse IDE using the same file.encoding as the java editor uses:

    eclipse -vmargs -Dfile.encoding=UTF-8

    AND

    Window -> Preferences... -> General -> Workspace -> Text file encoding -> Other -> UTF-8

    When you export your RCP application then, the UTF-8-labels are displayed correctly. There are no special VM arguments needed to start the RCP application.

    With this, you can share UTF-8 source code between Linux and Windows Eclipses.

提交回复
热议问题