Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

SWT/Devel/Gtk/NonAsciiCharacters

< SWT‎ | Devel‎ | Gtk

Non-Ascii causes compile issues

One should avoid having non-ascii characters in the code base as it brings up warnings in compilitations. This can happen if you copy and paste from some webpage.

This can lead to compilation issues like:

 /opt/public/hipp/homes/genie.cbi/workspace/cbi-swt-natives-linux- x86_64/eclipse.platform.swt.binaries/
 bundles/org.eclipse.swt.gtk.linux.x86_64/temp.folder/@dot.src/org/eclipse/swt/
 accessibility/AccessibleObject.java:46: warning: unmappable character for encoding ASCII
 // ATK_ROLE_TABLE_ROW was introduced in ATK 2.1.0. See Bug??470629  for details.
                                                            ^
 SRC: https://hudson.eclipse.org/cbi/job/cbi-swt-natives-linux-x86_64/3561/console

Finding Non-Ascii characters

To check if you have ascii characters in your code base, you can use a script like:

 #!/bin/sh 
 cd "/home/lufimtse/git/eclipse.platform.swt"
 grep -r --color='auto' -P -n "[\x80-\xFF]" --include=*.java

Example use:

 # swtasciicheck 
 bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java:46:		// ATK_ROLE_TABLE_ROW was introduced in ATK 2.1.0. See Bug 470629  for details

Back to the top