Converting plain ASCII punctuation characters into HTML entities according to basic typography rules