Solved

OpenTextFile in FSO

Posted on 2004-04-22
8
671 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
ID: 10907955
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
ID: 10918089
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
ID: 10922530
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
ID: 10927112
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Accepted Solution

by:
ZeeSparrow earned 100 total points
ID: 10929089
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
ID: 10937222
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
ID: 10939197
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
ID: 10939323
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 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

20 Experts available now in Live!

Get 1:1 Help Now