Visualizzazione dei risultati da 1 a 2 su 2

Discussione: Leggere Testo Unicode

  1. #1

    Leggere Testo Unicode

    Ciao a tutti, ho creato questa funzione per leggere dei files di testo:

    codice:
    function leggi(filetxt)
    	Set fs=CreateObject("Scripting.FileSystemObject")
    	Set f=fs.OpenTextFile(Server.MapPath(filetxt),1)
    	leggi = f.ReadAll
    	f.Close
    	Set f=Nothing
    	Set fs=Nothing
    end function
    Solo che quello che ottengo è una roba tipo questa: ÿþM
    Il problema temo sia perchè i files che voglio leggere sono in UNICODE e non ANSI, qualcuno sa come posso fare a leggerli per bene?

    grazie
    Noize•Power

  2. #2
    risolto così:

    codice:
    Set f=fs.OpenTextFile(Server.MapPath(filetxt),1,1,-1)
    OpenTextFile(filename, iomode, create, format) returns an instance of the TextStream object corresponding to filename. iomode specifies whether the file should be opened for reading (1), for writing (2). or for appending (8). create indicates whether to create the file if it does not already exist. If format is -1, it opens the file as Unicode. If it is 0, it opens it as ASCII. If format is -2, the file is opened according to the system default.
    Noize•Power

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.