Hi,

i am reading a text from the net and like to have it right encoded
(german umlaute)

-----------
                        conn = new URL(mediaUrl).openConnection();
                        InputStream is = conn.getInputStream();
                        ByteArrayBuffer baf = new ByteArrayBuffer(50);
                        InputStreamReader isr = new 
InputStreamReader(is,"windows-1252");

                        int current = 0;
                        while ((current = isr.read()) != -1)
                        {
                                baf.append((byte) current);
                        }
                        Log.i(TAG, " *------ Load Data done -----*: ");

                        /* Convert the Bytes read to a String. */
                        html = new String(baf.toByteArray());
-------------

but still in my final "html" its not encoded and the german umlaute
are wrong.

Who can i read a stream and get it right encoded?

thanks
chris

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to