I found the solution for this issue on this page: https://www.baeldung.com/java-string-remove-emojis
Using this replaceAll function all Emoji's can be removed when needed :
replaceAll($String,'[\uD83C-\uDBFF\uDC00-\uDFFF]','')
The community commons has an XSSSanitize function. You should use that to filter out unwanted characters before you commit or clean them before generating the PDF by creating a temp object where you fill all the values used in the PDF.
Regards,
Ronald