Print Page | Close Window

reading other languages with FSO

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=9561
Printed Date: 29 March 2026 at 10:15am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: reading other languages with FSO
Posted By: snooper
Subject: reading other languages with FSO
Date Posted: 05 February 2004 at 7:52am

hi folks

i am reading a text file in Hebrew, via FSO (code below).

but its coming out in ???? instead of the actual Hebrew text.

i have tried playing around with server.htmlEncode, but it doesnt seem to help. i also have the correct codePage set.

any ideas what can be done?

thanks!

Sn

code;

------------------------------------------------------------ ------

Set FS=Server.CreateObject("Scripting.FileSystemObject")
Set RS=FS.OpenTextFile(Server.MapPath("../../database/whatsnew.t xt"), 1,False)
fcount=RS.ReadLine
RS.Close

 

------------------------------------------------------------ ---

Function IncludeFile(FilePath)
Set FSO = server.createobject("scripting.filesystemobject")
Set Include = FSO.opentextfile(FilePath)
While not Include.atendofstream
LineInput = Include.Readline
if left(LineInput,2) = "<" & "%" then LineInput = right(LineInput,len(LineInput) - 2)
if right(LineInput,2) = "%" & ">" then LineInput = left(LineInput,len(LineInput) - 2)
Execute(LineInput)
Wend
End Function




Replies:
Posted By: MorningZ
Date Posted: 05 February 2004 at 1:40pm

might want to look at the section on "format"

http://msdn.microsoft.com/library/en-us/vbenlr98/html/vamthopentextfile.asp?frame=true - http://msdn.microsoft.com/library/en-us/vbenlr98/html/vamtho pentextfile.asp?frame=true

try the "unicode" setting



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: snooper
Date Posted: 05 February 2004 at 2:54pm

i was very optmistic, but it turns out tht it doesnt have any effect ...

:(

thanks though!



Posted By: FLATLINE
Date Posted: 16 December 2005 at 10:00am
Is there any other solution? I'm having this problem as well...

-------------
Visit my site: http://darkgreen.service-club.net - DarkGreen HQ


Posted By: theSCIENTIST
Date Posted: 17 December 2005 at 3:37pm
Not sure if this will help, but try this at the top of your asp page;

Response.CodePage = 65001

Response.CharSet = "utf-8"

I'm assuming you have the Hebrew font installed.

-------------
:: http://www.mylittlehost.com/ - www.mylittlehost.com


Posted By: FLATLINE
Date Posted: 18 December 2005 at 5:29am
Nope, it says
 
Microsoft VBScript runtime error '800a01b6' 

Object doesn't support this property or method: 'Response.CodePage'

And writing just the Response.CharSet doesn't help either...


-------------
Visit my site: http://darkgreen.service-club.net - DarkGreen HQ


Posted By: dogstar
Date Posted: 25 December 2005 at 1:12pm
hi all,

i've just come across the same problem.... nice to see i'm not alone....

i can't change the codepage to 6500 as there are other things done on the page which currently work with windows-1255.... i did try it though and the characters came out different, but still not hebrew....

by the way, the text on my site reads as weird characters and not ?????....

so, any solution for this one?

many thanks in advance for any help :-)

and merry christmas to you all

cheers

dog


-------------
Dog



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net