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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Using special ASCII characters in Output window
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

AKazak

Russia
1205 Posts

Posted - 02/17/2021 :  11:35:15 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

cpyang

USA
1406 Posts

Posted - 02/17/2021 :  9:28:29 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/18/2021 :  02:02:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 02/18/2021 :  04:00:50 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/18/2021 :  04:40:12 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Edited by - AKazak on 02/18/2021 04:40:21 AM
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 02/18/2021 :  1:58:48 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
We just released Beta6 and the following will work

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


CP
ORG-23221
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/19/2021 :  02:54:06 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 02/19/2021 :  04:19:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I just replied to you on the beta forum.

CP
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/19/2021 :  07:36:56 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 02/19/2021 :  1:34:19 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Probably a font issue. Can you try Message Log?

type.redirection = 1024;


CP
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/19/2021 :  3:16:43 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

minimax

358 Posts

Posted - 02/23/2021 :  03:36:31 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/25/2021 :  04:47:19 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Edited by - AKazak on 02/25/2021 04:47:39 AM
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 02/25/2021 :  4:00:02 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/26/2021 :  03:25:42 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Edited by - AKazak on 02/26/2021 03:25:55 AM
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 02/26/2021 :  11:02:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
There are not many monospaced fonts, and I tried

Consolas

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

CP
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/26/2021 :  11:20:07 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 02/26/2021 :  12:35:31 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/26/2021 :  2:35:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Edited by - AKazak on 02/27/2021 04:24:53 AM
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 02/26/2021 :  8:26:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 02/27/2021 :  04:25:24 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Edited by - AKazak on 02/27/2021 04:25:54 AM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000