473,396 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

OpenTextFile and Unicode

I'm trying to write a .txt file with OpenTextFile method. This is working
alright, but since I'm using some danish characters and use Flash to read
the txt file I need to save the file as UTF-8 or Unicode.
Beneath is my code - how do I save the file as UTF-8 or Unicode?
----
Dim fso, f, filespec
Set fso = CreateObject("Scripting.FileSystemObject")
filespec = Server.Mappath("news.txt")
Set f = fso.OpenTextFile(filespec,2, True)

f.Write txtstring
f.Close
----
Thanks in advance!

Best regards
Simon K
Jul 19 '05 #1
0 2483

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

Similar topics

6
by: JT | last post by:
i have a text file that is used as a logfile for easier debugging. i am using the OpenTextFile method to write to this file. this method exists inside a logging function that can be called from...
2
by: jwallison | last post by:
XPSp1/IIS 5.1 What am I doing wrong? The following code just hangs in asp page at OpenTextFile() - and inet service manager just hangs if I try to unload app at this point - <script...
3
by: Fie Fie Niles | last post by:
In my ASP (IIS 5.1), when I use oFile.OpenTextFile to open a file, the code stucks. How can I fix this problem? Thanks. set oFile = CreateObject("Scripting.FileSystemObject") strServerFileName...
2
by: Serge Myrand | last post by:
Hi, I cannot use the OpenTextFile method, it's never return and I get no error message! Setting Response.Buffer=False, has no effect. No matter if I use it ForReading or ForWriting, it never...
2
by: Neil Schemenauer | last post by:
python-dev@python.org.] The PEP has been rewritten based on a suggestion by Guido to change str() rather than adding a new built-in function. Based on my testing, I believe the idea is...
0
by: Vladislav Moltchanov | last post by:
In the following example code some thing is wrong: <<<<<<<<<< Sub OpenTextFileTest Const ForReading = 1, ForWriting = 2, ForAppending = 3 Dim fs, f Set fs =...
6
by: Paul | last post by:
In one place in my project, I need to create a text file. Each time it runs it should overwrite the previous version. I use the following code and it works fine: FileLoc =...
2
by: ShieldsJared | last post by:
Hello all, So I recently found out about redirecting the Standard Output of a vbscript back to my C# app but I've found a problem. When I run a script that calls OpenTextFile, I do not receive...
1
by: itskaps | last post by:
Hi all, My following program code works fine on win 2K server but the same is not working on win2K3 server. It's showing error as page cannot be displayed. After debugging, I found that...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.