Convert ASCII PostgreSQL Bank to UTF-8 in Java Ksoap

2

I have app Android that consumes from a webservice where the database is PostgreSQL and the ASCII type. When I try to print the string returned in the app it unconfigures the letter with accentuation, for example, Pulmão = Pulm?o .

Should I do this conversion on the service or on the client and which command should the case be? And should I configure anything in the Eclipse IDE to accept this command?

Example:

  • My Webservice which is in java does the query in the postgres database (ASCII) and returns a string / object with the fields. These fields are set to an object of the type person for example.
  • This object is consumed by the Android app for later viewing. So if I look up the person's data and the "John" comes, the "ã" is printed on the unconfigured screen. Eclipse is configured for UTF-8, so I'm not sure how to handle this problem. I have tried (getbytes (). Forname ("UTF-8") and others, but syntax error.
  • In-app return snippet:

    HttpTransportSE Transport = new HttpTransportSE(URL);
    Transport.debug = true;
    
    Transport.call(SOAP_ACTION, envelope);
    
    //Recebendo retorno do Webservice
    
    SoapObject response = (SoapObject)envelope.bodyIn;
    
        
    asked by anonymous 25.08.2015 / 22:21

    0 answers