While creating the table into oracle database by PROC SQL/Data step statement i'm getting "-" symbol got converted into "â€“" special character. Can anyone please suggest how to prevent the conversion.
Original Data is in SAS datasets is : "Infections - Viral Hepatitis - New or worsening"
After loading data into Oracle database it will become "Infections - Viral Hepatitis â€“ New or worsening"
Currently i'm using INENCODING=ANY OUTENCODING=ANY options with Libname statement.
When using INENCODING='UTF-8' OUTENCODING='UTF-8' options with libname then getting below error..
ERROR: Some character data was lost during transcoding in the dataset TEST. Either the data contains characters that are not
representable in the new encoding or truncation occurred during transcoding.
Thank you in advance.
Tuesday - last edited Tuesday
Did you check what encoding is your SAS and Oracle.
For SAS run: proc options option=encoding; run;
For Oracle run : select * from nls_database_parameters where parameter = 'NLS_CHARACTERSET';
Make sure you have the right encoding for both.
Thank you for your suggestion. I check and found my SAS 9.4 default encoding is "WLATIN1" and my oracle DB default encoding UTF-8.
Can you please suggest how to convert encoding WLATIN1 to UTF-8 . i used outencoding options with libname statement but getting the same error as earlier.
Please let me know if any other suggestion to pervert the conversion.
Some chars in UTF-8 can't be converted to WLatin1, those chars are causing the trouble. Imho changing the encoding of the sas session is the only way to solve the issue. Session encoding can only be changed in the sas servers config files.
Make SAS and Oracle has the same encoding.
Check sasenv_local file .
WLATIN1 is your sas encoding. use this code check:
proc options option=encoding;run;