472,978 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,978 software developers and data experts.

Save a file in UTF-8 format from ASP vbscript

I need to save a file in UTF-8 format from an ASP file.
Using FileSystemObject I can only save them in Unicode (UTF-16, I think) but
not in UTF-8:

Set zzzz = fso.OpenTextFile(filepath, 2, true, -1)

How do I can save my file in UTF-8 format ?

I have tried to convert the file to UTF-8, with this code:

Dim objStream
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Type = adTypeText
objStream.Position = 0
objStream.Charset = "utf-8"
objStream.LoadFromFile filepath
objStream.SaveToFile filepath, adSaveCreateOverWrite
set objStream = nothing

But, that code doesn't do anything and no error occurs. :-?

Thanks in advance for your replays
Jul 19 '05 #1
0 14661

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Francesc Guim Bernat | last post by:
Dear Colleagues, i'm developing a C++ .NET based application that works with System.Xml library. My problem appears when i try to save a document througt XmlDocument->Save method, because it...
by: gnv | last post by:
Hi all, I am writing a cross-browser(i.e. 6 and netscape 7.1) javascript program to save an XML file to local file system. I have an xml string like below: var xmlStr = "<?xml version="1.0"...
by: Scot | last post by:
How do I get the following code to not put the Unicode BOM in the file. If the attribute ecoding=UTF-8 exists, it will put the BOM in the file. objXMLDocument = New XmlDocument ...
by: Michael Lehar | last post by:
Hallo I have a pictureBox with a picture loaded from file, then I draw some lines on the picture, and then I want to save the new picture. Befor I can draw lines I have to create a Graphics...
by: Stefano | last post by:
I've a form windows with a lot of textbox controls. How can I do if I have to save all text proprety of this controls in an external file, to reload them in future?
by: ferd | last post by:
Hello, I want to query an access database in ASP (classic) and save the results as an XML file that I can use as a Data Island in Internet Explorer - I have the recordset, I can save it as XML,...
by: Henok Girma | last post by:
Hello Gurus, I want to save the state of an unbound DataGridView on my Windows Form application to an XML file so i can later load it back.. Basically, on my form I have a DataGridView, it's got...
by: joffypf | last post by:
hi how can save utf-8 encoded string to a text file. I tryed to save unicode string but unicode string only display just ike '????'. please help me...
by: abehm | last post by:
Hello, I am trying to save an entire xml document as a string and then insert it to a sql server db as an xml data type. The problem is when I read the xmldocument to the string, somewhere along the...
by: not_a_commie | last post by:
Here are a few thoughts for loading and storing your xml using the XmlDocument class: First, don't ever insert the header manually. This is to be done by the writer. In other words, don't do...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.