replacing characters with ascii codes