[fpc-pascal] Unicodestrings and Assign(File)
XHajT03 at hajny.biz
Sat May 19 18:09:04 CEST 2012
On Sat, May 19, 2012 13:12, JĂźrgen Hestermann wrote:
> 1.) The 2 fundamental file types filerec and textrec (for standard files
> text files) are defined in
> fpc\fpc\rtl\inc\filerec.inc and
> Both differ only by some buffer structures at the end but share the
> first part
> (including file name). The file name is of type
> array[0..255] of char;
> and needs to be replaced by UnicodeString.
> This requires other changes:
> 1.) The order of elements in the file data structures have to be changed.
I don't know what's the order used by Delphi (assuming that file and text
as basic Pascal constructs are still supported there), but it's certainly
better not to change the order of the attributes at the beginning;
changing the call to FillChar is no problem. Also, it may be better
keeping the current field for 8-bit name and add the UnicodeString as a
new field instead in order not to require encoding between 8-bit charsets
and UnicodeString on platforms not having UnicodeString support.
More information about the fpc-pascal