rkeen-siemens opened a new issue, #4818: URL: https://github.com/apache/netbeans/issues/4818
### Apache NetBeans version Apache NetBeans 15 ### What happened Some Unicode characters display as \u escapes in the property sheet. I would expect that if they can be rendered (as you can see when editing the value in the property sheet) that the actual character glyph would be rendered rather than the textual escape. ### How to reproduce 1. Create a new JForm Java application 2. Add a component with a text property (e.g. a `JLabel`) 3. Set the text property to something containing a Unicode character that is not supported directly by the font (e.g. `š£ā=ā£šā£/Ļ ā°`) 4. Move the focus to another property You'll now see the text with the Unicode characters escaped. The actual behavior will depend on the current UI font you are using, but on Linux the string above appears as `\ud835\udc63ā=ā£\ud835\ude1dā£/Ļ ā°` ### Did this work correctly in an earlier version? No / Don't know ### Operating System Windows 10 Pro, CentOS 7.6 with Gnome 3 ### JDK Java 17.0.4.1 ### Apache NetBeans packaging Apache NetBeans provided installer ### Anything else The renderer attempts to avoid showing undisplayable characters and converts them to their unicode escapes using [RendererFactory.makeDisplayable](https://github.com/apache/netbeans/blob/81fae58229c39adbe4f5b3b371a7087562e781bb/platform/openide.explorer/src/org/openide/explorer/propertysheet/RendererFactory.java#L475). However, it uses [Font.canDisplay(char)](https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/Font.html#canDisplay(char)) which cannot handle supplementary characters. It should use [Font.canDisplay(int)](https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/Font.html#canDisplay(int)) and provide the character as a Unicode code point. ### Are you willing to submit a pull request? Yes ### Code of Conduct Yes -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
