Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 74765

send input file with special characters (such as accents) to the web server

$
0
0

I´m working with asp classic and using IIS like web server. i have to send files (using input files) from the html web page. The problem is when i have special caracteres in the files´ name. For example: when the file´s name is "Distribución de tareas para desarrollo.docx" and the name reaches the server like "Distribución de tareas para desarrollo.docx" Here is my html head code.

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

I try to work with the charset in the html code and the asp code but it´s does´t work.

Now add these lines as suggested by the user @Daniel Nordh.

`
 <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
 <% Response.CodePage = 65001
    Response.CharSet = "UTF-8" 
 %>

` But, the result is the same.

Well it seems that I am facing the issue badly. I know that when sending input file from the browser, the data arrives with binary files. Once I separate the header I see that the file reaches the server it does as follows.

-----------------------------7e33a72830078c Content-Disposition: form-data; name="doc"; filename="Distribución de tareas para desarrollo.docx" Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document PK

And reading the name is the same way I get.

But if I write the following code on the same page asp.

response.write "<br>panificación<br>"

When requesting the page is displayed. panificación.

What I am thinking about is that I have the problem because it is input files that are sent as binary files.

HTML form to send the files.

<form  method="post" action="files.asp" target="_blank"
  enctype="multipart/form-data"><div class="group-form"><div class="input-group"><input accept=".doc,.docx" type="file" name="archivo"><span class="input-group-addon">doc (opcional)</span></div></div></form>

I hope someone can helpe me. PD: sorry for my english.


Viewing all articles
Browse latest Browse all 74765

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>