AndroidXMLEncoder extends net.sf.okapi.common.encoder.XMLEncoder { String escapeSingleQuotes(String text) { return escapeCharacter(text, '\''); } AndroidXMLEncoder(boolean oldEscaping); @Override String encode(String text, EncoderContext context); String escapeAndroid(String text); String escapeAndroidOld(String text);  }
@Test public void testEscapeSingleQuote() { assertEquals("a\\'b" , androidXMLEncoder.escapeSingleQuotes("a'b")); }
@Test public void testEscape2SingleQuote() { assertEquals("a\\'\\'b" , androidXMLEncoder.escapeSingleQuotes("a''b")); }
@Test public void testEscapeStartSingleQuote() { assertEquals("\\'b" , androidXMLEncoder.escapeSingleQuotes("'b")); }