BookmarkSubscribeRSS Feed

UTF8로 작성된 code를 EUC-KR로 변경하는 방법

Started ‎05-11-2021 by
Modified ‎05-11-2021 by
Views 4,123

UTF8로 작성된 code를 EUC-KR로 변경하는 경우, iconv를 사용할 수도 있지만, 아래와 같이 INFILE statement를 사용해서 할 수도 있습니다.

 

filename test1 "/r/ge.unx.sas.com/vol/vol610/u61/sasjlh/public/test1.txt";
filename test5 "/r/ge.unx.sas.com/vol/vol610/u61/sasjlh/public/test5.txt";

 

data _null_;

   infile test1 encoding="utf8" truncover;
   file test5 encoding="euc-kr" ; input code $1-200 ;
   put code;
run;

 

< 참고 자료 >

1. Example 5: Using the INFILE= Statement to Specify an Encoding for Reading from an External File

https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/nlsref/n0utx4w7x4exijn1wt7pk0srrxz5.htm#p0... 

2. TRUNCOVER
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsref/n1rill4udj0tfun1fvce3j401plo.ht... 

Version history
Last update:
‎05-11-2021 12:58 AM
Updated by:
Contributors

sas-innovate-white.png

🚨 Early Bird Rate Extended!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Lock in the best rate now before the price increases on April 1.

Register now!

Article Labels
Article Tags