INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Powerbuilder 12.5 GetUrl not working

Powerbuilder 12.5 GetUrl not working

(OP)
Hello, trying to convert an old Powerbuilder 7.0 system to the latest version. Don't know much about Powerbuilder. The conversion to the later system worked for the most part with not a lot of changes needed. However I have a problem with a call the system makes to the internet/url to retrieve data. It works with the 7.0 Powerbuilder but now with the 12.5. I put it in debug and stepped thru both versions. They seem to work exactly the same until it actually retrieves the data. The data retrieved with the 12.5 is actually chinese characters. This may be too confusing but any help would be greatly appreciated.

The call involves

Summary:

Variable definitions:

inet iinet_base
u_omni_data lu_omni_data

The code first issues 1) GetContextService("Internet", iinet_base)
2) lu_omni_data = Create u_omni_data
3) iinet_base.GETURL('the url to call', lu_omni_data)
4) ls_result_string = lu_omini_data.f_GetResultString()


After step 3, the geturl call the data is retrieved and contains gibberish.


The u_omni_data user object contains 2 functions
1) internetdata (blob data)

ii_length_data = LEN(data)
ii_result_data = String(data)

2) f_GetResultString which simply moves the retrieved data into variable fields.



LEN(data) returns the same value for both the old 7 version and the 12.5 version so i'm wondering if it's getting the correct results but somehow it's not readable?

String(data) is where I get the gibberish/chinese characters.

RE: Powerbuilder 12.5 GetUrl not working

(OP)
I actually found the solution to this on another post. The fix was to add EncodingAnsi! when moving the retrieved data into the string variable.

ls_data = String(data, EncodingAnsi!)


RE: Powerbuilder 12.5 GetUrl not working

Unicode was added to PB I think in Version 9 so I'm not surprised you ran into something.

Matt

"Nature forges everything on the anvil of time"
www.anvil-of-time.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close