unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#56675: UTF16 encoding adds BOM before every single character
@ 2022-07-20 21:39 Jean Abou Samra
  0 siblings, 0 replies; only message in thread
From: Jean Abou Samra @ 2022-07-20 21:39 UTC (permalink / raw)
  To: 56675

With this code:

(let ((p (open-output-file "x.txt")))
    (set-port-encoding! p "UTF16")
    (display "ABC" p)
    (close-port p))

the sequence of bytes in the output file x.txt is

['FF', 'FE', '41', '0', 'FF', 'FE', '42', '0', 'FF', 'FE', '43', '0']


As you can see, a BOM is being added before every
single character instead of just at the beginning.

Originally reported at
https://lists.gnu.org/archive/html/guile-user/2022-07/msg00041.html






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-20 21:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-20 21:39 bug#56675: UTF16 encoding adds BOM before every single character Jean Abou Samra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).