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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.