?
Solved

OpenTextFile in FSO

Posted on 2004-04-22
8
Medium Priority
?
689 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 
LVL 2

Accepted Solution

by:
ZeeSparrow earned 300 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

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

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

777 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