added checks for right encoding for comment