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.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: