Make utf-8 conversion more robust to bad input.

This commit is contained in:
James Roseborough
2008-01-14 23:11:09 +00:00
parent 2461b46908
commit 8570761928
2 changed files with 9 additions and 5 deletions

View File

@@ -76,6 +76,7 @@ public class LStringTest extends TestCase {
assertEquals( userFriendly( before ), userFriendly( after ) );
}
public void testNullTerminated() {
char[] c = { 'a', 'b', 'c', '\0', 'd', 'e', 'f' };
String before = new String(c);