Solved

OpenTextFile in FSO

Posted on 2004-04-22
8
668 Views
Last Modified: 2008-03-10
Hi everybody,

I'm using ASP to read from a txt file and write some of the contents of it to a DB...

But there is a problem with the character set. Those txt files have on them some Greek phrases and when i'm trying to read them they come to my screen as garbage characters..

I know that, when i'm opening the file I have to open it as OEM Character Set but I dont know how to do it.. I tried to open it as unicode, ASCII but it didnt help me out....

Can anyone help me please ?
0
Comment
Question by:Miracle_Gr
  • 4
  • 4
8 Comments
 
LVL 2

Expert Comment

by:ZeeSparrow
Comment Utility
Sounds like a character set difficulty.  See http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/charsets/charset4.asp

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=windows-1253">
or
<%@Language=VBScript codepage=1253%>
0
 

Author Comment

by:Miracle_Gr
Comment Utility
Unfortunately this solution didnt help me out :( I've tried everything including changin the LCID) but still got the problem..

Any other ideas ???
0
 
LVL 2

Expert Comment

by:ZeeSparrow
Comment Utility
How about copying and pasting the Greek into your HTML page directly... just to make sure you can view them to begin with.

Also - are the characters being entered into the database correctly?  (Are they being read correctly just not displayed on screen correctly)?

In case you haven't guessed - now I am grasping at straws.  ;-)
0
 

Author Comment

by:Miracle_Gr
Comment Utility
Well, in fact my problem is that the file that I read with FSO has the OEM Chartacter Set.. So when I use :

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

I can perfectly read the content of the file on the browser with correct characters..

But when I try to update my DB still I have the problem of characters... I have to find a way :

a - To open my file with FSO in OEM Character Set Format
or
b - To open the file in ASCII format and then convert it to OEM.

I dont know how to do them both...

I tried to find a way for the OpenTextFile method to open the file in OEM format but I think that there isnt any !!

I tried to find a script for the conversion but still havent found one !!!

I have to solve this issue and I have to solve it today :(((
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 2

Accepted Solution

by:
ZeeSparrow earned 100 total points
Comment Utility
Public software from Diomidis D. Spinellis, Associate Professor in the Department of Management Science and Technology of the Athens University of Economics and Business, and director of the ELTRUN Research Center - Software Engineering and Security (SENSE) group (home page: http://www.dmst.aueb.gr/dds/):

http://www.dmst.aueb.gr/dds/sw/greek/grconv/

Information:
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q216/3/99.ASP&NoWebContent=1
http://support.microsoft.com/default.aspx?scid=kb;EN-US;153449

One caution:
http://www.schemamania.org/jkl/booksonline/SQLBOL70/html/1_client_22.htm

Hope this helps!
0
 

Author Comment

by:Miracle_Gr
Comment Utility
Thanks Zeesparow for your interest but I managed to solve the problem with another way..

I found a little progy (4Kb) which does exactly what I want (conversion from OEM to ANSI) so before the file process using ASP and WScript I run that program on specific file, save it on another location and continue my work on the new file.

But thanks again to you for your interest..
0
 
LVL 2

Expert Comment

by:ZeeSparrow
Comment Utility
Miracle_Gr - thanks for the points.  Sorry I didn't help further.
What program is it (and where did you find it) if I may ask?
0
 

Author Comment

by:Miracle_Gr
Comment Utility
Hi ZeeSparrow,

I found that proggy on the internet site : http://www.geocities.com/SiliconValley/Garage/5238/Download.html

Name of the author is Louis Lecaroz...

Its a 4 Kb Exe file that makes that convertion perfectly..

See ya..
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now