צפיות
תשובות
ASP וקריאת עברית עם FSO
שלום חברים
אני מנסה לקרא קובץ טקסט פשוט, עם מילים בעברית, אבל זה יוצא לי כל פעם בתור ?????.
ניסיתי להיעזר ב- 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 תשובות
נסה אולי כך
ע"י השימוש בשיטה charSet של האובייקט RESPONSE
Response.CharSet = 1255
תודה, אבל באיזה שלב לשים?
נסה לפתוח אותו כיוניקוד
תודה, אבל מסתבר שזה לא זה… (ל"ת)