Quantcast
Channel: SCN : All Content - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 2935

Foreign characters in web service response

$
0
0

Hi all

 

I'm calling an address searching API from PB Classic 12.5 and while the generated proxies work fine any response with foreign characters embedded in the strings is displayed with those characters replaced with question marks.

 

The service output is encoded in UTF-8 and all of the debug tools I have for inspecting the response data also display the question marks.

 

I've read a lot about Unicode fonts but I'm not sure that the response data survives the assignment to the string var in the proxy generated response class. In there an implicit conversion to Unicode?

 

I've tried assigning the response string to a blob and then back to a string. I get different results depending on the encoding argument I provide to each of these functions.Results that make me think I'm close to getting it right.

 

This code results in a string that still contains '??' in place of the accented U in Zurich - Z??rich

 

lb_test = blob(lst_find_results[1].text)
ls_test= string(lb_test, encodingansi!)

 

Interestingly this code results in a string that contains only the problem character but without the accent - U. Might be a coincidence but I doubt it.

 

lb_test = blob(lst_find_results[1].text)
ls_test= string(lb_test)

 

Ultimately I need Z??rich converted to Zurich before I display or store it and any advice you might have on how to do that would be greatly appreciated.

 

For reference the WSDL is here: http://services.postcodeanywhere.co.uk/CapturePlus/Interactive/Find/v2.10/wsdl.ws

 

Many thanks in advance

 

Dax


Viewing all articles
Browse latest Browse all 2935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>