Thanks for the reply, but i do not have any exceptions in user name as you pointed out in joe example.Later i need to print those values in the file, if i take out the special characaters from the user name it will not have any meaning.
So i need to do something within limitations. Is my apporaoch for special character handling is correct.
Thanks
NT