Skip navigation
Currently Being Moderated

Text encoding mac - PC [JS]

Dec 14, 2009 12:53 PM

Hi there

I am running a script there is writing a log file for processing on a pc server (Notes). I run my script on a Mac and save the script to a share.

 

My question is :

Is there a way to write PC compatebel file and getting the right line break ?

 

this is some of the test i have done:

 

function myWriteLogfile(myLogText, myLogFilePath){

 

var myFilePath = myLogFilePath ;

var myFile = new File (myFilePath);

var myFileOpen = myFile.open("e","UTF-8");

if (myFileOpen) {

    myFile.seek(0,2);

    myFile.write (myLogText+"\r"+"\n");

    myFile.close();

    }     

      }

 

and "\n"+"\r");    and I have tried to open the file with the "\uFEFF" first.

 

Hoping someone can help

 

/T

 
Replies
  • Currently Being Moderated
    Dec 14, 2009 2:04 PM   in reply to (MightyJack)

    Why are you inserting both a return and a line break?

     

    What does it look like on the Windows side?

     

    Harbs

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 14, 2009 4:13 PM   in reply to (MightyJack)

    I'm sorry — made mistake through lack of attention.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points