1. Benjamin Hübner
  2. PowerBuilder
  3. Monday, 13 May 2019 13:31 PM UTC

Hello experts,

do you know how to enter ALT key codes (unicodes) for symbols in text fields?

For example, we would like to enter the symbol for a phone:

Symbol: "✆"
Name: "Public pay phone"
ALT code number: ALT + "9990"

We always get the symbol "♠" displayed and not the "✆".

With copy & paste it works.

Do you have an idea?

(We are using P B2017 R3).

Kind regards
Benjamin

Michael Kramer Accepted Answer Pending Moderation
  1. Saturday, 18 May 2019 13:22 PM UTC
  2. PowerBuilder
  3. # 1

Hi Benjamin,

Status line (microhelp) in CharMap.exe displays the values you need:

  • Left side: Unicode value
    Which is of value ONLY when you write code.
    For you U+2706 => CHAR(9990).
  • Right side: Keystroke using numeric keypad
    For you blank => No numeric keypad combo! cry

Luckily without keypad combos you found the solution: Copy+Paste from CharMap.exe.

HTH /Michael

 

Comment
  1. Benjamin Hübner
  2. Monday, 20 May 2019 11:44 AM UTC
Hi Michael,



Thank you for your explanation. That shows me that I'm not quite crazy. ;)
  1. Helpful
There are no comments made yet.
Benjamin Hübner Accepted Answer Pending Moderation
  1. Thursday, 16 May 2019 14:37 PM UTC
  2. PowerBuilder
  3. # 2

Hi,

if it depends on the font and the text objects in powerbuilder can only display one font at a time, why can I copy & paste the symbol into a text object with the font "arial"?

Comment
There are no comments made yet.
Benjamin Hübner Accepted Answer Pending Moderation
  1. Thursday, 16 May 2019 07:25 AM UTC
  2. PowerBuilder
  3. # 3

Hi,

I just want to know the ALT+nnn code for the symbols. The text object can also display them in "arial". I just don't know how to enter the characters with the keyboard.

regards,

Benjamin

Comment
  1. Roland Smith
  2. Thursday, 16 May 2019 10:41 AM UTC
Also, use leading zeros so that you type 4 numbers.
  1. Helpful
  1. Benjamin Hübner
  2. Thursday, 16 May 2019 12:44 PM UTC
I know how to enter the number, but I don't know the number for the symbols. ;)

When I enter the number 9990, I don't get the phone "✆", I get the spade "♠" - that´s the problem.

Can someone give me the number for the phone "✆"?
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 16 May 2019 13:58 PM UTC
FWIW: I use the CHARMAP MS-Windows utility to get these. Just select the font your using and then scroll down to the symbol you want to use. That will show you the ALT+nnnn you need to type in. Again, the key is the font being used.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 15 May 2019 15:19 PM UTC
  2. PowerBuilder
  3. # 4

Hi Ben;

  PB drives the entire text in an ST, SLE or MLE based on one font setting. When I have a mixture of font requirements to get these special characters woven into what the user interprets as one test line .. I use multiple ST and/or SLE's strung out together so they look like one. Each one with the required font setting.

  The other alternative is to use Roland's RTE suggestion.

Regards ... Chris

Comment
There are no comments made yet.
Benjamin Hübner Accepted Answer Pending Moderation
  1. Wednesday, 15 May 2019 06:43 AM UTC
  2. PowerBuilder
  3. # 5

Hi Chris,

you are right.

When I enter ALT+9990 in a Word document, the font automatically changes to "Segoe UI Symbol".

But why can e.g. a multiline edit display the symbols via copy & paste and why can't you enter these symbols via an ALT+nnn code via the keyboard?

Comment
  1. Roland Smith
  2. Wednesday, 15 May 2019 10:32 AM UTC
PowerBuilder doesn't automatically change the font like Word does, also in PowerBuilder th font setting applies to the entire control. Maybe you should try a RichText contro and see what happensl.
  1. Helpful
There are no comments made yet.
Benjamin Hübner Accepted Answer Pending Moderation
  1. Tuesday, 14 May 2019 07:05 AM UTC
  2. PowerBuilder
  3. # 6

Hi Chris,

what surprises us is that it works with the same font "Arial" in Word and Outlook and in this editor.

Why not in PB DW text columns, single line edits and so on?

Why does it work with copy & paste? It can be displayed, but not entered with ALT+nnn.

Good: that the symbols are not coloured is understandable, but why are completely different symbols displayed?

 

kind regards,

Ben

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 14 May 2019 16:41 PM UTC
Hmmm ... I tested the ALT+9990 in my W10 based latest MS-Word & MS-Outlook software and I get .... ♠

I do not see any phone symbol in the Arial font on my PC's.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 13 May 2019 19:28 PM UTC
  2. PowerBuilder
  3. # 7

Hi Ben;

  The hex character code via the ALT+nnn is also dependent of the chosen font. When you see the hex ALT+nnn in the CharMap utility, remember that when you are in the PB IDE's text properties of any textual based object - you need to set the correct font and then enter the ALT+Numeric pad in "decimal".

  In my example below .. the phone is only a character within the Wingdings2 font of MS-Windows 10 and its an ALT+x28. So in the PB IDE, I set the font to WingDings2 and then press ALT+040 (decimal equivalent). Now my phone icon displays properly in the IDE and at run-time (as long as that font also resides on the user's PC where the EXE runs).

HTH

Regards ... Chris

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Monday, 13 May 2019 17:39 PM UTC
  2. PowerBuilder
  3. # 8

It sounds like you should submit a bug report.

 

Comment
There are no comments made yet.
Benjamin Hübner Accepted Answer Pending Moderation
  1. Monday, 13 May 2019 15:39 PM UTC
  2. PowerBuilder
  3. # 9

Hi Roland,

that's exactly what we're doing (as I've already written).
It doesn't work with the ALT key - only with copy & paste (e.g. from the windows character table).

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Monday, 13 May 2019 15:30 PM UTC
  2. PowerBuilder
  3. # 10

Hold down the ALT key and type the number on the numeric keypad.

You can also use the Character Map tool. On Windows 10 it is under Windows Accessories\System Tools.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.