public String convertUnicodeCharacterRepresentation(String input) {
		final char[] chars = input.toCharArray();
		int nonAsciiCharCount = countNonAsciiCharacters(chars);
		if(! (input.contains("\\u") || input.contains("\\U")) && nonAsciiCharCount == 0)
			return input;
		int replacedNonAsciiCharacterCount = 0;
		final char[] result = nonAsciiCharCount == 0 ? chars : new char[chars.length + 5 * nonAsciiCharCount];
		for (int offset = 0; offset < chars.length;  offset++) {
			int resultOffset = offset + 5 * replacedNonAsciiCharacterCount;
			final char c = chars[offset];
			if (c == '\\' && (chars[offset+1] == 'u' || chars[offset+1] == 'U')) {
				putFormattedUnicodeRepresentation(chars, offset, result, resultOffset);
				offset+=5;
			} else if(c <= 127) {
				if(resultOffset >= result.length ) {
					throw new AssertionError(input + "//" + new String(result));
				}
				result[resultOffset] = c;
			} else {
				putEncodedNonAsciiCharacter(c, result, resultOffset);
				replacedNonAsciiCharacterCount++;
	        }

        }
		return new String(result);
    }
@Test
	public void convertsUnicodeToUpperCase(){
		final FormatTranslation formatTranslation = new FormatTranslation();
		assertThat(formatTranslation.convertUnicodeCharacterRepresentation("u"), CoreMatchers.equalTo("u"));
		assertThat(formatTranslation.convertUnicodeCharacterRepresentation("\\Uabcde"), CoreMatchers.equalTo("\\uABCDe"));
		assertThat(formatTranslation.convertUnicodeCharacterRepresentation("\\uabcde"), CoreMatchers.equalTo("\\uABCDe"));
		assertThat(formatTranslation.convertUnicodeCharacterRepresentation("1\\Uabcde"), CoreMatchers.equalTo("1\\uABCDe"));
	}