Hello All,
When I test SAS Logging Facility in SAS Programs,I met this error.
sample1:
filename TestLog (".\test.log" ) encoding='UTF-8';
%LOG4SAS( )
%LOG4SAS_APPENDER(TestLog,"FileRefAppender",'FILEREF=TestLog THRESHOLD=DEBUG')
%LOG4SAS_LOGGER("testLogger","ADDITIVITY=TRUE APPENDER-REF=(TestLog) LEVEL=DEBUG")
%macro test(x);
%LOG4SAS_DEBUG(testLogger, "&x") ;
%put &x.;
%mend;
%test(This is a test!);
filename TestLog clear;
It Works well .
I chang the "This is a test!" ->"This is 啊 test!" (just one double-byte char).It works well too;
but when I change it to“This is 啊 test !”(two double-byte chars).An error occurred
'ERROR: Can't create transcoding pipeline for fileref appender "TestLog ". '
What Happend? Why ?
what is the second dbcs char? HTML us utf8 and not seeing that one. Not every two bytes is a valid char in utf8 (1-4bytes).
@Japp Karman:
The second dbcs char is the last one "!" (exclamation mark).
When I change it to “This is 啊 test 哈” ,the error occurred,too .
Than your error makes no sense. Did you try SAS TS already?
NO ,I am not contact them. I was just curious about it .It's not a job. Tks,Japp Karman.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.