EG transcoding issue

Accepted Solution Solved
Reply
Regular Contributor
Posts: 161
Accepted Solution

EG transcoding issue

Dear All:

I use Enterprise Guide as my main IDE.  If I copy something online and paste it into the EG, the SAS says it cannot transcode UTF-16 to WLATIN1.  I'm wondering if there is some online tool or website that can do this translation job?  Otherwise, I have manually type in all the sentence manually, as I just did.  The thing is that even MS notepad cannot do the work...  Thank you!


Accepted Solutions
Solution
‎08-20-2014 01:41 AM
Valued Guide
Posts: 3,206

Re: EG transcoding issue

Use the encoding tab....

- A file with the setting Ansi will accept only sbcs when pasting

- A file utf-8 setting wil accept al kind of stuff.

Conversion no not possible as you cannot put 100liter oil in you 1 liter wine bottle.  You have to stop when it is full.

Do you have a file-flat file with all that kind of encoding stuff you can read that with SAS  it is the encoding option with the infile.

SAS will translate and give the overload messages when applicable.

SAS(R) 9.4 National Language Support (NLS): Reference Guide, Third Edition (encoding file name)

That Byte order mark - Wikipedia, the free encyclopedia  is a trick how many tools are recognizing it. The pitfall is that some tools are getting lost with that. Using notepad Windows it is accepting utf-8 copy-paste, the message is coming when saving as ansi (W7). Notepad++ wil detect it is utf8 by that bom-char.

For example,This is showing notepad: ȚȜȞȟ    This showing old type command: ´╗┐╚Ü╚£╚×╚ƒ

The Bom char: ´╗┐ and 4 utf8 chars ╚Ü╚£╚×╚ƒ (binary 00 and a classic ascii char)    This is exactly the same dataset being shown.

The only difference is how the tool has displayed it.

lol: Htlml is supporting utf8 I can copy paste those chars without noticing the difference it is not ascii.

---->-- ja karman --<-----

View solution in original post


All Replies
Valued Guide
Posts: 3,206

Re: EG transcoding issue

Ah nice.... Yes Eguide is running aware of urtf8 (Unicode). copying and pasting into the Eguide editor you will not note the difference with MS-office. These are already longer running as utf8. The website (html) is also running urf8 encoding. Utf8 is newer and more advanced as utf-16.  It is also easier to handle as it shares a lot with latin-1.   But beware the bom-indicator. The bom is a special string often added to indicate it is a urf8 file.

The charmap tool offer you a way to select those chars and copy paste them not knowing to type them.

One of the tools not running utf8 is the classic sas latin1 installation.  You could run sas using a urf8 session when having chosen to install. The utf8 sas session also has disadvantages. (NLS support).

What you could use is a tool like notepad++ (Notepad++ Home)  It has a tab encoding to choose from. Use the Ansi setting to revert to latin-1 single byte. As Utf-16 (UCS2) has more characters the Ansi you can loose those and will se ? being e   
 

---->-- ja karman --<-----
Regular Contributor
Posts: 161

Re: EG transcoding issue

Hi, Jaap:

Thank you for the tips.  I've notepad ++, but I'm not sure if just copying and pasting would suffice to fix the encoding issue.  Is there a simple a fast converter? 

One thing for sure is that the native Notepad won't do the job.  I searched couple of website the claim to generate plain text, but actually they don't.

Solution
‎08-20-2014 01:41 AM
Valued Guide
Posts: 3,206

Re: EG transcoding issue

Use the encoding tab....

- A file with the setting Ansi will accept only sbcs when pasting

- A file utf-8 setting wil accept al kind of stuff.

Conversion no not possible as you cannot put 100liter oil in you 1 liter wine bottle.  You have to stop when it is full.

Do you have a file-flat file with all that kind of encoding stuff you can read that with SAS  it is the encoding option with the infile.

SAS will translate and give the overload messages when applicable.

SAS(R) 9.4 National Language Support (NLS): Reference Guide, Third Edition (encoding file name)

That Byte order mark - Wikipedia, the free encyclopedia  is a trick how many tools are recognizing it. The pitfall is that some tools are getting lost with that. Using notepad Windows it is accepting utf-8 copy-paste, the message is coming when saving as ansi (W7). Notepad++ wil detect it is utf8 by that bom-char.

For example,This is showing notepad: ȚȜȞȟ    This showing old type command: ´╗┐╚Ü╚£╚×╚ƒ

The Bom char: ´╗┐ and 4 utf8 chars ╚Ü╚£╚×╚ƒ (binary 00 and a classic ascii char)    This is exactly the same dataset being shown.

The only difference is how the tool has displayed it.

lol: Htlml is supporting utf8 I can copy paste those chars without noticing the difference it is not ascii.

---->-- ja karman --<-----
Regular Contributor
Posts: 161

Re: EG transcoding issue

Hi, Jaap:

I just resolve the problem using the method you mentioned.  It works great!

☑ This topic is SOLVED.

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

Discussion stats
  • 4 replies
  • 312 views
  • 0 likes
  • 2 in conversation