BookmarkSubscribeRSS Feed

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

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

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... 

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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Article Labels
Article Tags