Jump to Real's How-to Main page

Encode and display character using hex code

Thanks to J. Lakeman

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

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

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

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

If you find this article useful, consider making a small donation
to show your support for this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2005
[ home ]