Page 1 of 1

How can i display greek characters.

Posted: Sun Aug 04, 2013 9:39 pm
by panosdk
Well sorry for asking again but i cannot seem to figure this one out. I want to display greek characters into my stack. Greek characters appear normal in the stack. But when i try to display characters through code into an answer or a label i get question marks. As you can see in the attached picture, the button of stack has greek characters displaying ok. But the label box has question marks. Even the code editor after i close and open it again has question marks.

Re: How can i display greek characters.

Posted: Sun Aug 04, 2013 9:58 pm
by Simon
Hi again panosdk,
The attached stack is taken from step 7 of the lesson I mentioned earlier.

I get why you may be having troubles with this, it's not very apparent that you have to put the text into a fld first.
But it does work (slightly odd).

Simon

Re: How can i display greek characters.

Posted: Mon Aug 05, 2013 12:39 am
by panosdk
Thank you.I got it.Thanks for your example simon.
What if i just want to display a greek string.
for example

put "greek string" into somevar
answer somevar

The example you showed me gets the htmltext of a string in a text field.How can i do the same thing with just a variable and no textfield.
Have a nice day

Re: How can i display greek characters.

Posted: Mon Aug 05, 2013 6:50 am
by Simon
Hi panosdk,
You should look up "useUnicode" and "charToNum/numToChar" in the dictionary.
I think you'll have to store your text as numeric values.
e.g. put "917 943 956 945 953 32 963 964 945 32 949 955 955 951 957 953 954 940" into someVar (that is the greek string that was in the stack I posted).
For "answer..." you would have to do a numToChar into a (hidden?) field and do the htmlText thing again.

I could be wrong and maybe someone will correct me. Does seem like an awful lot of work.

Simon
EDIT: might be simpler to save the htmlText, again this uses a field for "answer..."
"put the htmlText of fld 1 into gGreek" now the info is stored in a var. (it's a field again for the translation into html but now you can save it anywhere).
You could use:

Code: Select all

put "<p><font face="Segoe UI" size="12">&Epsilon;&#943;&mu;&alpha;&iota;</font> <font face="Segoe UI" size="12">&sigma;&tau;&alpha;</font> <font face="Segoe UI" size="12">&epsilon;&lambda;&lambda;&eta;&nu;&iota;&kappa;&#940;</font></p>" into gGreek
then:
"set the htmlText of fld 2 to gGreek" -- put it into a fld for the "answer..."

EDIT 2:
From the lessons there is no other way to get Greek into the ask/answer dialog but to use a field.

Re: How can i display greek characters.

Posted: Mon Aug 05, 2013 12:01 pm
by panosdk
I used a hidden textfield.I wish this thing will get fixed somehow.Thanks