T O P I C R E V I E W |
JonasKlim |
Posted - 12/04/2017 : 10:03:08 AM Hello, I want to write a script to enter text strings with special characters, like → (arrow - Nr 2192 from character map. How to program these symbols in strings?
Best regards,
Jonas |
5 L A T E S T R E P L I E S (Newest First) |
JonasKlim |
Posted - 12/06/2017 : 01:29:29 AM Hello Chris and CP,
Thank you for the very detailed answers.
Best regards,
Jonas |
Chris D |
Posted - 12/05/2017 : 6:22:53 PM Hi Jonas,
You may experience that certain "characters" do not display properly (they may be a space or even a little block) even though they are actually correct and work in scripts as you describe. Here is the explanation.
Starting with Origin 2018 such characters are actually Unicode "code points". Unicode covers many tens of thousands of different "code points" but whether or not they actually displayed is dependent on the font used in whatever context they are being displayed. That is, some fonts contain glyphs for some Unicode code points while others don't. And while there is not single font that contains every single Unicode code point, some contain pretty much all that are of common interest.
So, for example, in Script Window, if you see blanks where you know valid characters are, that is because we haven't updated Script Window to better handle such situations. Code Builder is able to display many more of these characters, including cutting and pasting them but even it won't handle some of the less commonly used Unicode code points. The good news is those are generally not ones used in math, science, etc so it shouldn't be an issue.
BTW- the site listed below is an excellent resource for finding Unicode "characters" (e.g. it has an excellent free text search). You can copy and paste the actual character from that site in to Origin or get the Unicode "hex code" for Alt+X as @CP mentioned. If you see "U+210F", the hex code for Alt+X is the alphanumeric part after "U+". In this case it would be 210F.
https://codepoints.net/
I hope this helps.
Thanks, Chris Drozdowski Originlab Technical Support
|
cpyang |
Posted - 12/05/2017 : 07:13:32 AM Hi Jonas,
Origin 2018 supports the same mechanism as MS Word to enter Unicode characters. You can google and find links like
https://www.johndcook.com/blog/2008/08/17/three-ways-to-enter-unicode-characters-in-windows/
Basically you first enter Unicode code like 2192, then hold Alt and press X. This works in most places in Origin 2018, but may not be all. It certainly works on the worksheet, but if you find any situation that it did not work, please report back so we can fix it.
CP
|
JonasKlim |
Posted - 12/05/2017 : 03:05:08 AM Hello Chris,
I am using Origin Student 2018, 64 bit.
I want to put text like "360 nm 290 K, B ‖, ←" In comment cells through the worksheet. I am looking for the way to write the script line and have trouble to print special characters in Lab Talk. I have just checked, that if I copy the "360 nm 290 K, B ‖, ←" string from worksheet comment cell to Lab Talk and then use it as argument (col(12)[C]$= "360 nm 290 K, B ‖, ←";), it works correctly, but the special characters are seen only as spaces in Lab Talk. May be there is a direct way for writing special characters in Lab Talk?
Best regards,
Jonas
|
Chris D |
Posted - 12/04/2017 : 1:58:18 PM Can you explain a little more exactly what you'd like to do?
Also what version of Origin are you using?
Thanks, Chris Drozdowski Originlab Technical Support
|
|
|