call handle_character with \n if line is empty