Click here to Skip to main content
15,887,822 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all!

I want to know how to Download Zip File From URL with utf8 filenames and foders.

Now im doing that with:

InputStream input = connection.getInputStream();
FileOutputStream output = new FileOutputStream(archivos.PathArchivosApp + "app.zip");

byte data[] = new byte[4096];
						long total = 0;
						int count;
						while ((count = input.read(data)) != -1) {
							// allow canceling with back button
							if (isCancelled())
								return false;
							total += count;
							// publishing the progress....
							if (fileLength > 0) // only if total length is known
								onProgressUpdate((int) (total * 100 / fileLength));
							output.write(data, 0, count);
						}


And im getting folders name without encoding like:

Euphorbia hirta - Lecher?n

and the folder name should be:

Euphorbia hirta - Lecherón

Someone knows whats the problem?

(Sorry for my bad english)

Thanks!
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900