I've cloned from
https://github.com/alexruiz/fest-swing-1.x.git into Netbeans (and a standalone directory to further confirm issue) and find errors against some files:
org.fest.swing.keystroke.
KeyStrokeMappingProvider_de.java
KeyStrokeMappingProvider_fr.java
KeyStrokeMappingProvider_mac_fr-FR.java
The issue appears to be with git doing something to the special characters for key stroke mappings that use none ASCII chars. Below is an example where the encoding is damaged (********** marked) when I git clone the repository. I've also cloned to a standalone (command line used) directory on windows 7 wijh the same problem.
Doing a compare to downloaded zip files of Fest-Swing1.2 and looking at the sources.jar you can see what the special characters are. If I copy/paste the affected lines from the sources.jar to the NetBeans Ide the special characters show correctly and okay.
I've googled git for UTF and encoding issues and only found issues pertaining to file names with UTF-8.
Do you have any idea as to the cause and a possible fix?
(Ideally, for key stroke mappings character shouldn't be used, but utf code values should be for none ASCII chars [as is pointed out by discussion on UTF-8/internationlization advocates]).
Thx anyone
Git cloned source
==========
KeyStrokeMappingProvider_de.java
---------------------------------------------
public Collection<KeyStrokeMapping> keyStrokeMappings() {
List<KeyStrokeMapping> mappings = new ArrayList<KeyStrokeMapping>(120);
mappings.addAll(defaultMappings());
mappings.add(mapping('0', VK_0, NO_MASK));
mappings.add(mapping('=', VK_0, SHIFT_MASK));
mappings.add(mapping('}', VK_0, ALT_GRAPH_MASK));
mappings.add(mapping('1', VK_1, NO_MASK));
mappings.add(mapping('!', VK_1, SHIFT_MASK));
mappings.add(mapping('2', VK_2, NO_MASK));
mappings.add(mapping('"', VK_2, SHIFT_MASK));
mappings.add(mapping('�', VK_2, ALT_GRAPH_MASK)); ************
mappings.add(mapping('3', VK_3, NO_MASK));
mappings.add(mapping('�', VK_3, SHIFT_MASK)); *************
mappings.add(mapping('�', VK_0, ALT_GRAPH_MASK)); *************
mappings.add(mapping('4', VK_4, NO_MASK));
mappings.add(mapping('$', VK_4, SHIFT_MASK));
mappings.add(mapping('5', VK_5, NO_MASK));
mappings.add(mapping('%', VK_5, SHIFT_MASK));
sources.jar code
==========
public Collection<KeyStrokeMapping> keyStrokeMappings() {
List<KeyStrokeMapping> mappings = new ArrayList<KeyStrokeMapping>(120);
mappings.addAll(defaultMappings());
mappings.add(mapping('0', VK_0, NO_MASK));
mappings.add(mapping('=', VK_0, SHIFT_MASK));
mappings.add(mapping('}', VK_0, ALT_GRAPH_MASK));
mappings.add(mapping('1', VK_1, NO_MASK));
mappings.add(mapping('!', VK_1, SHIFT_MASK));
mappings.add(mapping('2', VK_2, NO_MASK));
mappings.add(mapping('"', VK_2, SHIFT_MASK));
mappings.add(mapping('²', VK_2, ALT_GRAPH_MASK)); *** correct
mappings.add(mapping('3', VK_3, NO_MASK));
mappings.add(mapping('§', VK_3, SHIFT_MASK)); *** correct
mappings.add(mapping('³', VK_0, ALT_GRAPH_MASK)); *** correct
mappings.add(mapping('4', VK_4, NO_MASK));
mappings.add(mapping('$', VK_4, SHIFT_MASK));
mappings.add(mapping('5', VK_5, NO_MASK));
mappings.add(mapping('%', VK_5, SHIFT_MASK));