Add unicode handling when detecting strings in LXML