Forum Discussion

shrap's avatar
shrap
New Contributor
15 years ago

aqFile.WriteToTextFile inserts 3 chars at begining

Hi,

I have this simple code in JScript:

  aqFile.WriteToTextFile("c:\\tmp.txt","text",aqFile.ctUTF8);

and the result is attached. I guess it is a bug or am I missing something?



Regards

David

3 Replies

  • shrap's avatar
    shrap
    New Contributor
    Oops. I must look dumb now ;) However, our application does not write BOM into UTF-8 files (since it is not mandatory) and thus when I compare such two files, these 3 chars are extra. I suppose there is no way how to tell TC not to write these 3 bytes, is it?
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi David,



    Try

    aqFile.WriteToTextFile("c:\\tmp.txt","text",aqFile.ctANSI);