Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Encoding Problems with Qype API + Android

Encoding Problems with Qype API + Android

Put your problem here if it does not fit any of the other categories.

Encoding Problems with Qype API + Android

Postby crashraider » Fri Jul 31, 2009 1:29 am

Hi, I have problems with the data returned by the API QYPE in Android.

The problem is that the accents and some characters do not show me, and I've seen that QYPE API returns the XML in UTF-8. I have tried to change the encoding in the request, but I have worked and will no longer be done.

The Code:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.                         URL url = new URL("http://api.qype.com/v1/positions/41.6508376,-0.882167/places?content_language=es&in_category=883");
  2.  
  3.                         HttpURLConnection request = (HttpURLConnection) url.openConnection();
  4.  
  5.                         consumer.sign(request);
  6.  
  7.                         request.addRequestProperty("Accept-Language", "Accept-Language: es");
  8.  
  9.                         request.setRequestProperty("Content-Type", "application/xml; charset=ISO-8859-1");
  10.  
  11.                         //request.addRequestProperty("Content-Type", "application/xml; charset=ISO-8859-1");
  12.  
  13.                         request.connect();
  14.  
  15.                         Log.d("CONTENT:",request.getContentType());
Parsed in 0.021 seconds, using GeSHi 1.0.8.4


CONTENT log shows me:

07-31 01:50:04.644: DEBUG/CONTENT:(1942): application/xml; charset=utf-8


What can I do? Any ideas? Thanks
crashraider
Freshman
Freshman
 
Posts: 2
Joined: Tue Jul 21, 2009 6:51 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot] and 6 guests