Java ResourceBundle leading whitespace in values

只愿长相守 提交于 2019-11-30 17:01:12

A Unicode escape sequence \u0020 should do it, because the properties parser should recognise it as an actual value and the Java String should interpret \u0020 as the Unicode code point for space.

Alternatively, IIRC, you can escape the space with a backslash like this \ my value. Works for keys, too.

You can escape space with backlash:

s1 =\ computer
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!