Unprinted string shaped by ICU4J

I print two Arabic strings.

The first: is printed well but needs some Arabic shaping. The second: is the output of the shaping method of ICU4J as shown in the code but this string isn't printed.

Is there anything wrong with the shaping method? or the charsetname for the first string is not suitable for the second one?

  String title = new StringBuilder(rename).reverse().toString()+ '\n';

            ArabicShaping shaping = new ArabicShaping(ArabicShaping.LETTERS_SHAPE);
                String shapingText =  shaping.shape(title);

            catch ( ArabicShapingException e )
                //logger.log( Level.WARNING, e.getMessage( ), e );