I'm having problems with decrypting in Java bytes encrypted in C#.

The output from Java has mistakes in the final two of the five plaintext blocks. Block four is completely wrong, and block five has a single character error.

Things I've double-checked/noted:

* The Keys and IVs are the same, although I had to repeat the first byte of the 16-bit C# key at the end to create a 24-bit Java key.
* C# is using CBC and PKCS7. Blocksize is 8.
* Java is using CBC and PKCS5 (which is supposed to be the same as 7 for this purpose).

Here is the encryption side in C#

```
byKey = Encoding.UTF8.GetBytes(key);
TripleDESCryptoServiceProvider des = new TripleDESCryptoServiceProvider();
byte[] inputByteArray = Encoding.UTF8.GetBytes(val);
MemoryStream ms = new MemoryStream();
CryptoStream cs = new CryptoStream(ms, des.CreateEncryptor(byKey, IV), CryptoStreamMode.Write);
cs.Write(inputByteArray, 0, inputByteArray.Length);
cs.FlushFinalBlock();
return Convert.ToBase64String(ms.ToArray());

```

And decryption in Java

```
byte[] inputByteArray = Base64.decode(val);
Cipher c = Cipher.getInstance("DESede/CBC/PKCS5Padding");
c.init(Cipher.DECRYPT_MODE, new SecretKeySpec(byKey, "DESede"), new IvParameterSpec(iv, 0, 8));

byte[] decryptedBytes;
for (int i = 0, j = 0; i < inputByteArray.length; i++) {
    if ((decryptedBytes = c.update(inputByteArray, i, 1)) == null)
        continue;
    else {
        System.out.println(new String(decryptedBytes));
        j += decryptedBytes.length;
    }          
}

```

I'm expecting to see the plaintext blocks on the sys out. 
I am aware the .update() loop can be replaced with .doFinal() but I wanted to see it block by block.

I am not very familiar with Java, so I'd particularly appreciate any suggestions there.

**Edit**
I do not believe text encoding is the problem. Here is the original code that exhibits the same problem, just without showing the block-by-block nature of it:

```
byte[] decrypted = c.doFinal(inputByteArray);
return new String(decrypted, "UTF-8");

```