Setfile not UNICODE

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
Mariovaisman
Posts: 133
Joined: February 11th, 2013, 8:26 am

Setfile not UNICODE

Post by Mariovaisman »

Hello,

I am creating files that have to be transmitted to a server (could be FTP or Dropbox), found that the files created, includes in the first record, 3 special characters (UNICODE), I need to generate those files without the special characters, is it possible to advice the app not to include those characters?

Example:
file tempfile;
setfile(tempfile,"external.txt",create);
filewrite(tempfile,"text data");
close(tempfile);

IF you see the data it has
text data

When I see the file with a NO unicode editor, I see those characters, it is fine if the destination recognize unicode, however the destination is not a unicode application, and receives those characters as part of the data.

Thanks

Mario
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Setfile not UNICODE

Post by aaronw »

Those characters are the byte order mark and signify a Unicode encoding. After synchronizing try opening the file in notepad and saving as ANSI. Every time you open the file in CSPro it will be reconverted to Unicode. For more info take a look at:

"What if I want to use a data file with an older version of CSPro?" under Unicode Primer
Mariovaisman
Posts: 133
Joined: February 11th, 2013, 8:26 am

Re: Setfile not UNICODE

Post by Mariovaisman »

Thank you for your response.
I have solved the situation in the external application removing those initial characters in the files, and then continue with the process.
Post Reply