The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Using special ASCII characters in Output window

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
AKazak Posted - 02/17/2021 : 11:35:15 AM
OriginPro 2021b (64-bit) Beta 5 9.8.5.105
Windows 7 Pro x64 SP1

Greetings!

I want to create a pseudo graphical output from my LT script and use the special ASCII characters in Output window, for example box-drawing characters (https://en.wikipedia.org/wiki/Box-drawing_character):
╔,═,╗.

However, the Code Builder and Output window display ╔ like:


Is there a workaround for this?

Thank you.

---
Andrey
20   L A T E S T    R E P L I E S    (Newest First)
AKazak Posted - 02/27/2021 : 04:25:24 AM
quote:
Originally posted by cpyang

To find the default font, from script window type


system.font.=


Terminal font certainly won't have those Unicode characters. Did you try "Consolas"?

CP



[Font]
Output=Consolas

in origin.ini located @ UFF worked perfectly.

---
Andrey
cpyang Posted - 02/26/2021 : 8:26:18 PM
To find the default font, from script window type


system.font.=


Terminal font certainly won't have those Unicode characters. Did you try "Consolas"?

CP
AKazak Posted - 02/26/2021 : 2:35:44 PM
quote:
Originally posted by cpyang

Origin will use whatever is in your Windows. You can find all the fonts by going to Code Builder

Tools > Options > Text Editor > Font and Colors

this will change only the fonts used in the editor, but you can see all the fonts in your system there.

As for Origin.ini, change the one in your UFF.

CP



OK, got it!

However
[Font]
Output=Terminal

produced incorrect symbols:


What could be a reason for this?
By the way, how do I find the default fonts for Message Log and Output Window?

---
Andrey
cpyang Posted - 02/26/2021 : 12:35:31 PM
Origin will use whatever is in your Windows. You can find all the fonts by going to Code Builder

Tools > Options > Text Editor > Font and Colors

this will change only the fonts used in the editor, but you can see all the fonts in your system there.

As for Origin.ini, change the one in your UFF.

CP
AKazak Posted - 02/26/2021 : 11:20:07 AM
quote:
Originally posted by cpyang

There are not many monospaced fonts, and I tried

Consolas

and it showed the correct unicode for the corners, can you try?

CP




Can you list all monospaced fonts that may be used by Origin, please?

As for origin.ini: I found one file in Origin installation directory and another --- in the UFF. Which one should I edit?

---
Andrey
cpyang Posted - 02/26/2021 : 11:02:38 AM
There are not many monospaced fonts, and I tried

Consolas

and it showed the correct unicode for the corners, can you try?

CP
AKazak Posted - 02/26/2021 : 03:25:42 AM
quote:
Originally posted by cpyang

Can you try in beta7 if this has fixed your case?
Also, beta7 allow font for Message Log and Output to be set from origin.ini

[Font]
Output=Terminal
MsgLog=Magneto

CP




Here is what I get in 2021b Beta 7:



What monospaced TrueType font do you recommend using?

---
Andrey
cpyang Posted - 02/25/2021 : 4:00:02 PM
Can you try in beta7 if this has fixed your case?
Also, beta7 allow font for Message Log and Output to be set from origin.ini

[Font]
Output=Terminal
MsgLog=Magneto

CP
AKazak Posted - 02/25/2021 : 04:47:19 AM
quote:
Originally posted by minimax

Hi AKazak,

Would you mind to open Control Panel, go to region and language dialog, Administrative tab,
What is the setting for "Current language for non-Unicode programs"?

Max
OriginLab Technical Support



Here it is:


---
Andrey
minimax Posted - 02/23/2021 : 03:36:31 AM
Hi AKazak,

Would you mind to open Control Panel, go to region and language dialog, Administrative tab,
What is the setting for "Current language for non-Unicode programs"?

Max
OriginLab Technical Support
AKazak Posted - 02/19/2021 : 3:16:43 PM
quote:
Originally posted by cpyang

Probably a font issue. Can you try Message Log?

type.redirection = 1024;

CP




The same result in the message log:


---
Andrey
cpyang Posted - 02/19/2021 : 1:34:19 PM
Probably a font issue. Can you try Message Log?

type.redirection = 1024;


CP
AKazak Posted - 02/19/2021 : 07:36:56 AM
quote:
Originally posted by cpyang

We just released Beta6 and the following will work

type.redirection = 32;//Output Window
type "begin";
type "\u2554====\u2557";
type "end";


CP
ORG-23221



Output window still shows this incorrectly:


Is this a font issue?

---
Andrey
cpyang Posted - 02/19/2021 : 04:19:08 AM
I just replied to you on the beta forum.

CP
AKazak Posted - 02/19/2021 : 02:54:06 AM
quote:
Originally posted by cpyang

We just released Beta6 and the following will work

type.redirection = 32;//Output Window
type "begin";
type "\u2554====\u2557";
type "end";


CP
ORG-23221



Dear CP,

Great news!
Where do I get a Beta6 download link?

---
Andrey
cpyang Posted - 02/18/2021 : 1:58:48 PM
We just released Beta6 and the following will work

type.redirection = 32;//Output Window
type "begin";
type "\u2554====\u2557";
type "end";


CP
ORG-23221
AKazak Posted - 02/18/2021 : 04:40:12 AM
quote:
Originally posted by cpyang

so \u will allow source code still ANSI but to generate Unicode string.

CP




I agree.
The support would be great!

---
Andrey
cpyang Posted - 02/18/2021 : 04:00:50 AM
I was asking if it would be useful to support \u, but from what you tried, seems like it would, as the Code Builder source code file might be ANSI so paste text including Unicode character can be problematic, so \u will allow source code still ANSI but to generate Unicode string.

CP
AKazak Posted - 02/18/2021 : 02:02:36 AM
quote:
Originally posted by cpyang

Which output window? The message log works it seems but Script Window does not.

type.redirection=1024;
type "begin";
type "╔======╗";
type "end";


Currently there is no escape code for unicode character, do you think that is useful? Like to see the code above written instead as

type.redirection=1024;
type "begin";
type "\u2554======\u2557";
type "end";


CP




While working in Code Builder I redirect output to Output window of the Code Builder:
type.redirection=32; // Redirect output to Output window


If I call:
type.redirection=1024;
type "begin";
type "\u2554======\u2557";
type "end";



then I the following in the Message Log:


Anyway, I think that using box-drawing characters is an old-shool, but cool and useful technique.
Thus, it would be great to have escape codes for Unicode characters.

By the way, if I paste:
type.redirection=1024;
type "begin";
type "╔======╗";
type "end";

to the Code Builder's editor window, then I observe:


---
Andrey
cpyang Posted - 02/17/2021 : 9:28:29 PM
Which output window? The message log works it seems but Script Window does not.

type.redirection=1024;
type "begin";
type "╔======╗";
type "end";


Currently there is no escape code for unicode character, do you think that is useful? Like to see the code above written instead as

type.redirection=1024;
type "begin";
type "\u2554======\u2557";
type "end";


CP

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000