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
[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 - decode inputstream??

decode inputstream??

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

decode inputstream??

Postby guruk » Fri Mar 13, 2009 2:41 pm

Hi,

I have two versions to read my data, but anyhow.. how to decode the data (windows-1252)
in the right way.. right now i dont see for example the german umlaute

-----------------------
conn = new URL(mediaUrl).openConnection();
InputStream is = conn.getInputStream();
BufferedInputStream bis = new BufferedInputStream(is);
ByteArrayBuffer baf = new ByteArrayBuffer(50);


/*-- much faster */
int size = is.available();
byte[] buffer = new byte[size];
is.read(buffer);
is.close();
html = new String(buffer);


/* slower version
int current = 0;
while ((current = isr.read()) != -1)
{
baf.append((byte) current);
}

html = new String(baf.toByteArray());
*/
-----------------------------------------

hope one of you know a solution

thanks
chris
guruk
Junior Developer
Junior Developer
 
Posts: 24
Joined: Sun Mar 08, 2009 8:05 pm

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 6 guests