Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Charset conversion error with xml.getNodeValue()  (Read 15167 times)
Tim B.
Posts: 67


« on: October 08, 2012, 09:49:02 am »

I've written an interface to Google's geocoding web service and I get a 'Charset conversion error' when getNodeValue() returns some Chinese characters (in a UK address) from the XML message.  The docs say to 'Check fglrun LANG and system locale', but this result is unexpected (but valid) and I can't change these because of the odd one or two records like this, as I'd just get more errors from other character sets.

I assume it's possible for Google's web service to return results for almost any language charset.  Is it possible to deal with this sort of situation, or would I just have to trap the exception?

Any ideas and advice appreciated.
Frank G.
Four Js
Posts: 48


« Reply #1 on: October 08, 2012, 11:13:49 am »

Hi,

  Genero DVM can only handle with one charset at the time. So if you have set fglrun LANG to one charset, and Google returns another charset, an expected 4GL exception is raised. To handle this issue, there are only 2 ways :

 1. Add TRY ... CATCH ... END TRY statements around the problematic code
 2. Use UTF-8 as DVM charset (my recommended one, as your application is then able to deal with any charset used in Google response)

If you have some more issues, please send a mail to your support center

Regards,
Frank Gross
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines