Message Boards Message Boards

Importing some text with apostrophes

Posted 3 years ago

Hello!

I want to import a text in French, but unfortunately apostrohes disappear! Consider

LeTexte = Import["UEMO2021.txt", {"Text", "Lines"}]

While in the original document we have for instance the sentence "j’ai apprécié l’approche de l’origine des prénoms", I obtain in LeTexte : "j’ai apprécié l’approche de l’origine des prénoms".... What should I do? Thanks a lot in advance,

Claude

POSTED BY: Claude Mante
3 Replies
Posted 3 years ago

I think you'll succeed with Mike's suggestion above. But also be aware that different sources can use different characters for apostrophe. So one encoding might not work for all documents.

POSTED BY: Richard Frost

Thank you very much!

LeTexte = 
  Import["UEMO2021.txt", {"Text", "Lines"}, 
   CharacterEncoding -> "WindowsANSI"];

works perfectly!

Regards, Claude

POSTED BY: Claude Mante
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract