ICU-350 ucnv_openCCSID() did not work for 10xx etc.

X-SVN-Rev: 1093
This commit is contained in:
Markus Scherer 2000-04-07 16:58:58 +00:00
parent 8c8828272a
commit 9c2fc5ab0f
2 changed files with 7 additions and 9 deletions
icu4c/source
common
test/cintltst

View file

@ -53,10 +53,9 @@ void T_CString_integerToString(char* buffer, int32_t i, int32_t radix)
int32_t length=0;
int32_t num = 0;
int8_t digit;
int32_t j;
char temp;
while (i>radix)
while (i>=radix)
{
num = i/radix;
digit = (int8_t)(i - num*radix);
@ -69,12 +68,11 @@ void T_CString_integerToString(char* buffer, int32_t i, int32_t radix)
/*Reverses the string*/
for (j=0 ; j<(length/2) + 1 ; j++)
{
temp = buffer[length - j];
buffer[length - j] = buffer[j];
buffer[j] = temp;
}
for (i = 0; i < length; ++i, --length) {
temp = buffer[length];
buffer[length] = buffer[i];
buffer[i] = temp;
}
return;
}

View file

@ -324,7 +324,7 @@ void TestConvert()
someConverters[0] = ucnv_open(NULL,&err);
someConverters[1] = ucnv_open(NULL,&err);
someConverters[2] = ucnv_open("utf8", &err);
someConverters[3] = ucnv_openCCSID(949,UCNV_IBM,&err);
someConverters[3] = ucnv_openCCSID(1051,UCNV_IBM,&err); /* was 949 before testing j350 */
if (U_FAILURE(err)){ log_err("FAILURE! %s\n", myErrorName(err));}
/* Testing ucnv_getName()*/