Thank you every one for your help and support.
Finally I solved this ,Its an unicode issue .
In the previous version we used utf8 but latest moodle version we changed to use utf8mb4. So before upgrading we need to take backup of our database and convert the charset and collation of our database to utf8mb4. Once we successfully convert and re import the database this issue wont come again.
For me when i converted to utf8mb4 I lost many tables (around 30 tables ), so I manually find the missed tables and changed those tables collation into utf8mb4 individually. and then everything is perfect without any issues.
If Any one getting this same issue please go through the below sites and follow the steps they have mentioned.
Once again Thank you for your Help and Support.