You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/10/19 16:32:06 UTC

[GitHub] [netbeans] rkeen-siemens opened a new issue, #4818: Some Unicode characters display as \u escapes

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: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] mbien closed issue #4818: Some Unicode characters display as \u escapes

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien closed issue #4818: Some Unicode characters display as \u escapes
URL: https://github.com/apache/netbeans/issues/4818


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists