Hi, Check these classes: URLEncoder: http://developer.android.com/reference/java/net/URLEncoder.html URLDecoder: http://developer.android.com/reference/java/net/URLDecoder.html
I hope that is what you need. Albert. On Mar 13, 1:37 pm, guruk <ilovesi...@gmail.com> wrote: > 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 -~----------~----~----~----~------~----~------~--~---