@@ -58,21 +58,23 @@ tb[1] = of_base64_encode_table[(sb & 0x03F000) >> 12]; tb[2] = of_base64_encode_table[(sb & 0x000FC0) >> 6]; tb[3] = of_base64_encode_table[sb & 0x00003F]; [ret appendCString: tb - withLength: 4]; + withEncoding: OF_STRING_ENCODING_ASCII + length: 4]; } switch (rest) { case 1: tb[0] = of_base64_encode_table[buffer[i] >> 2]; tb[1] = of_base64_encode_table[(buffer[i] & 3) << 4]; tb[2] = tb[3] = '='; [ret appendCString: tb - withLength: 4]; + withEncoding: OF_STRING_ENCODING_ASCII + length: 4]; break; case 2: sb = (buffer[i] << 16) | (buffer[i + 1] << 8); @@ -80,11 +82,12 @@ tb[1] = of_base64_encode_table[(sb & 0x03F000) >> 12]; tb[2] = of_base64_encode_table[(sb & 0x000FC0) >> 6]; tb[3] = '='; [ret appendCString: tb - withLength: 4]; + withEncoding: OF_STRING_ENCODING_ASCII + length: 4]; break; } [ret makeImmutable];