Dear all,
after wrapping our heads around this for hours today, we don't know how
to get rid of this inconsistency. Thus I ask for help ...
SSCE:
BaseX 9.6.4 [Standalone]
Try 'help' to get more information.
> xquery file:write-text("a1.txt", "°" || out:nl()) (: Same with
codepoints-to-string(176) instead of "°" :)
Query executed in 183.94 ms.
> xquery file:read-text("a1.txt")
°
Query executed in 1.49 ms.
> xquery file:write-text("a2.txt", file:read-text("a1.txt"))
Query executed in 3.4 ms.
> xquery file:read-text("a2.txt")
[file:io-error] Decoding error: xb0
Testing the files with linux command-line tool "file", this is the output:
> file a1.txt
a1.txt: Unicode text, UTF-8 text
> file a2.txt
a2.txt: ISO-8859 text
Reading the file after "copying" it seems to change the encoding. How is
this supposed to be handled?
Regards,
Marco.