简体   繁体   English

如何在资源包中处理角色星标

[英]How is character star handled in a resource bundle

If we use "*" as part of the resource bundle, the character gets removed during the message formatting process (java.util.ResourceBundle). 如果我们在资源束中使用"*"作为字符,则在消息格式化过程(java.util.ResourceBundle)中将删除该字符。 How are we supposed to escape this character? 我们应该如何逃脱这个角色?

Try using \\* or the Unicode escapes form - \* 尝试使用\\ *或Unicode转义形式-\\ u002A

EDIT: Seems that to display \\* in answer here you need to type \\\\*. 编辑:似乎要在此处显示\\ *,您需要键入\\\\ *。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM