Share this page 

Encode and display character using hex codeTag(s): Powerscript


The tilde is a special character in Powerbuilder used as an escape character in a string.

// prints copyright sign and "A" "B" using hex code (ansi)
String ls_string = "This a test ~hA9 ~h41 ~h42"
Messagebox("hex", ls_string)

// prints copyright sign and "A" "B" using decimal code (ansi)
ls_string = "This a test ~169 ~065 ~066"
Messagebox("decimal", ls_string)

// prints a tilde
ls_string = "This a test ~~"
Messagebox("tilde", ls_string)