changed "%c" in text extraction to "%lc"