Hello,
In my data file csv have a lote of "’", I need to replace it just by " ' ".
I import my row data file with infile statement (infile "&Rep_Travail\xxxx.csv" dsd truncover lrecl=32767 encoding=wlatin2) and I get the table donne.sas
When I run the code:
data donnee_bis;
set donne;
var3_correct=tranwrd(var3,"’","'");
run;
I get the error that SAS "Failed to transcode data from U_UTF8_CE to LATIN_9_CE......."
I put already the options locale=FR before the infile. Maybe I need to change encoding option in infile statement?
Thank you for your help!
The data is attached.
Thank you
If your csv file was exported from an Excel workbook, you could correct the problem in Excel at the export step. In the export dialog, choose Tools - Web Options - Encoding -> Unicode (UTF-8)
Then try adding option encoding=WLATIN1 to your infile statement.
Maybe@Tom can help. He understands this encoding stuff.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.