DATA Step, Macro, Functions and more

How do I remove all the Chinese characters from a table?

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 5
Accepted Solution

How do I remove all the Chinese characters from a table?

 I have a table of strings. I need to extract useful info from this table. There are tons of Chinese characters in this table. I want to remove these Chinese characters. What can I use? Thanks.


Accepted Solutions
Solution
‎11-02-2017 05:56 AM
Super User
Super User
Posts: 9,855

Re: How do I remove all the Chinese characters from a table?

This is more a theoretical problem, if you have a load of string data with Chinese characters in it, how useful is that data full stop?  Just removing that might alter the content of the string totally, for example:

"I went out yesterday XYZ"

where XYZ means not, changes the whole concept of the test.  Me, I would want it translated if it was to be usable.

 

Anyways, can you read them into SAS ok?  If so does the compress() work?

want=compress(have,"kda");

This means keep digits and alpha.  Try it.

View solution in original post


All Replies
Solution
‎11-02-2017 05:56 AM
Super User
Super User
Posts: 9,855

Re: How do I remove all the Chinese characters from a table?

This is more a theoretical problem, if you have a load of string data with Chinese characters in it, how useful is that data full stop?  Just removing that might alter the content of the string totally, for example:

"I went out yesterday XYZ"

where XYZ means not, changes the whole concept of the test.  Me, I would want it translated if it was to be usable.

 

Anyways, can you read them into SAS ok?  If so does the compress() work?

want=compress(have,"kda");

This means keep digits and alpha.  Try it.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 203 views
  • 0 likes
  • 2 in conversation