• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 658
  • Last Modified:

RE : File upload for UTF-8 in ASP

Hi,

I would like to

1)upload the UTF-8 text file to web server
2) Open and validate the data one by one
3) Write the Log sheet in excel

My main concern is of UTF-8 data will not get broken while uploading , validating and writing log file.

Currently i am using upload.asp for my ansi characters.

Thanks
0
rajneesh1978
Asked:
rajneesh1978
  • 4
  • 3
1 Solution
 
_Stilgar_Commented:
If you're using the upload form element (<input type="upload" />) the file will be treated as binary and will be preserved. With FSO you should be able to read the text in it after it was uploaded with no difficulties. Just in case, you could save upload.asp as UTF-8 (instead of ANSI), but unless you're doing some heavy text processing there that won't be necessary.

Try that and let me know if something break. I don't think it will.
0
 
rajneesh1978Author Commented:
Can i have sample for the upload of UTF-8 txt file through ASP
0
 
_Stilgar_Commented:
You said you already have upload script? Anyway, you can use this one:

http://www.aspemporium.com/codelib.aspx?pid=139&cid=4
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
rajneesh1978Author Commented:
I am able to upload the UTF-8 file but now the problem is how can i read the UTF-8 file contents line by line

Any help will be highly appreciated
0
 
rajneesh1978Author Commented:
I am closing this question as it has been solved by myself.

I have used the stream object for reading instead of FSO, you cannot use FSO for reading UTF-8 data.
0
 
rajneesh1978Author Commented:
I am closing this question as it has been solved by myself.

I have used the stream object for reading instead of FSO, you cannot use FSO for reading UTF-8 data.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now