diff --git a/icu4c/source/test/iotest/filetst.c b/icu4c/source/test/iotest/filetst.c index 80f4653f8ed..88f510b211a 100644 --- a/icu4c/source/test/iotest/filetst.c +++ b/icu4c/source/test/iotest/filetst.c @@ -1443,7 +1443,7 @@ static void TestFileWriteRetval(const char * a_pszEncoding) { UChar testChar = 0xBEEF; if (!*a_pszEncoding || 0 == strcmp(a_pszEncoding, "ASCII")) { - testChar = 'A'; /* otherwise read test will fail */ + testChar = 0x65; /* 'A' - otherwise read test will fail */ } buffer = (UChar*) malloc(expected * sizeof(UChar)); @@ -1478,8 +1478,9 @@ static void TestFileWriteRetval(const char * a_pszEncoding) { return; } for (count = 0; count < expected; ++count) { - if (u_fgetc(myFile) != testChar) { - log_err("u_fgetc returned unexpected character\n"); + UChar gotChar = u_fgetc(myFile); + if(gotChar != testChar) { + log_err("u_fgetc returned unexpected character U+%04X expected U+%04X\n", gotChar, testChar); u_fclose(myFile); return; }