שלח תשובה

זירת השאלות

644
צפיות
4
תשובות

ASP וקריאת עברית עם FSO

,‏ 5 בפברואר, 2004

שלום חברים

אני מנסה לקרא קובץ טקסט פשוט, עם מילים בעברית, אבל זה יוצא לי כל פעם בתור ?????.
ניסיתי להיעזר ב- SERVER.HTMLENCODE, אך ללא הואיל. ה-CODEPAGE בדף הוא נכון.

יש למישהו רעיונות??

להלן 2 הגירסאות שניסיתי איתן (שתיהן עובדות כמו שצריך, קוראות את התוכן, אך הבעיה היא בהצגה):

תודה!



——————————————————————
Set FS=Server.CreateObject("Scripting.FileSystemObject")
Set RS=FS.OpenTextFile(Server.MapPath("../../database/whatsnew.txt"), 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




תגיות:

4 תשובות

  1. ניר טייב הגיב:

    נסה אולי כך
    ע"י השימוש בשיטה charSet של האובייקט RESPONSE

    Response.CharSet = 1255

שלח תשובה