Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save martinhynar/7685260 to your computer and use it in GitHub Desktop.
Save martinhynar/7685260 to your computer and use it in GitHub Desktop.
// Shall be executed with -Dfile.encoding=UTF-16 to construct correct String instance
public class LigatureTest {
public static void main(String[] args) {
byte[] baffle = "ba\uFB00le".getBytes(Charset.forName("UTF-16"));
System.out.println(new String(baffle).toUpperCase());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment