Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - reading other languages with FSO
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

reading other languages with FSO

 Post Reply Post Reply
Author
snooper View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 23 April 2002
Location: Israel
Status: Offline
Points: 333
Post Options Post Options   Thanks (0) Thanks(0)   Quote snooper Quote  Post ReplyReply Direct Link To This Post Topic: reading other languages with FSO
    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

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post 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/vamtho pentextfile.asp?frame=true

try the "unicode" setting

Contribute to the working anarchy we fondly call the Internet
Back to Top
snooper View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 23 April 2002
Location: Israel
Status: Offline
Points: 333
Post Options Post Options   Thanks (0) Thanks(0)   Quote snooper Quote  Post ReplyReply Direct Link To This Post Posted: 05 February 2004 at 2:54pm

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

:(

thanks though!



Edited by snooper
Back to Top
FLATLINE View Drop Down
Groupie
Groupie
Avatar

Joined: 08 July 2002
Location: Israel
Status: Offline
Points: 142
Post Options Post Options   Thanks (0) Thanks(0)   Quote FLATLINE Quote  Post ReplyReply Direct Link To This Post Posted: 16 December 2005 at 10:00am
Is there any other solution? I'm having this problem as well...
Visit my site: DarkGreen HQ
Back to Top
theSCIENTIST View Drop Down
Senior Member
Senior Member


Joined: 31 July 2003
Location: United Kingdom
Status: Offline
Points: 440
Post Options Post Options   Thanks (0) Thanks(0)   Quote theSCIENTIST Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
FLATLINE View Drop Down
Groupie
Groupie
Avatar

Joined: 08 July 2002
Location: Israel
Status: Offline
Points: 142
Post Options Post Options   Thanks (0) Thanks(0)   Quote FLATLINE Quote  Post ReplyReply Direct Link To This Post 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: DarkGreen HQ
Back to Top
dogstar View Drop Down
Newbie
Newbie
Avatar

Joined: 24 February 2005
Location: Israel
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote dogstar Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.