STATA 字母 ABCDEF 转 123456
clear input str10 var1 A B C D E F end cap:ssc install sencode save cishi1,replace encode var1,generate (var2) tostring var2,replace gen var4=tobytes(var1) gen var6=substr(tobytes(var1),3,.) gen var8=char(real(substr(tobytes(var1),3,.))-16)