WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Functions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

FileGet and Unicode


Question:

Fileput() appears to preserve unicode strings where as fileget() appears not to. We would like to open and close a unicode xml file without converting it to ansi. We can put it, we just can't get it.

Answer:

FilePut converts the Unicode strings to ANSI. We try do provide some binary capabilities so that you could code your own UDFs to do it. umm roughly - UNDEBUGGED
#definefunction FileGetW(fname)
s=FileSize(fname)
fbb=BinaryAlloc(s)
BinaryRead(fbb,fname)
fdata=BinaryPeekW(fbb,2,s-2)
BinaryFree(fbb)
return(fdata)
#endFunction

Article ID:   W16969
File Created: 2007:07:03:14:27:24
Last Updated: 2007:07:03:14:27:24