- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Weird Japanese symbols are being printing when I try to use following code to get Superscripts for my column headers:
%let x=%sysfunc(byte(185));
%put &x;
%let y=%sysfunc(byte(178));
%put &y;
define name / order order=data width=12 left flow "Name/~Family Name&x./~Age/Surname&y.";
I use SAS 9.4.
If I generate a RTF file everything is fine but when i try to generate WORD file these symbols (ケ,イ) show up in my report instead of ¹ and ².
Has anybody faced similar kind of thing before ? Please Help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
What's the default language set up on your computer?
@himanshu1105 wrote:
Weird Japanese symbols are being printing when I try to use following code to get Superscripts for my column headers:
%let x=%sysfunc(byte(185));
%put &x;%let y=%sysfunc(byte(178));
%put &y;
define name / order order=data width=12 left flow "Name/~Family Name&x./~Age/Surname&y.";
I use SAS 9.4.
If I generate a RTF file everything is fine but when i try to generate WORD file these symbols (ケ,イ) show up in my report instead of ¹ and ².
Has anybody faced similar kind of thing before ? Please Help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
It is English.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The characters with ASCII codes above 127 are FONT dependent.
You want to look to using UNICODE symbols as the font being used is doing something odd, likely using something that is not a simple ASCII encoding so extra byte(s) are added to the characters shifting them to oddness.
What ODS Style are you using when creating that RTF file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply.
I use ods style = analysis. That's what the workplace standards are.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply.
I use ODS style = analysis. That's what the workplace standards are.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
When I run this code:
ods rtf file='d:\junk.rtf' style=styles.analysis; data _null_; file print; put "Name/~Family Name&x./~Age/Surname&y."; run; ods rtf close;
I get
|
-------------------------------------------------------------------------------------------------- |
|
Name/~Family Name¹/~Age/Surname² |
which shows the superscripts. See if you get a similar result pointing to a valid location for the file of course. (Pasting rtf tables sucks on this site)
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply.
I use the following code to:
%macro special_char(unicode=, name=);
%global &name;
data _null_;
A=input("&unicode."x,$UCS2B4.);
call symput("&name.",trim(left(A)));
stop;
run;
%put Note: special_char: &name = ->|&&&name.|<- ;
%mend;
%special_char(unicode=00B9,name=super1);
%special_char(unicode=00B2,name=super2);
I get the RTF, right.
But as i run VBScript to convert it to .DOCX the 1,2 get converted to ケ and イ.
This is really weird, as this is happening for only one file. I use the same code for all the files and other outputs look fine.