Formatting text in chat message

i want to format text in chat messages like adding new lines at end of long text like \n or carraige retiurns but these specical chars displayed directly rather that get parsed and taking effect . its makes messages look really ugly

is there anyway i can add new line returm and other formating to chat message using smack api ?

Not via the api afaik.

This would be something your application would need to take care of.