GNU bug report logs -
#8283
sgml-xml-auto-coding-function() should respect the *-with-signature-* coding
Previous Next
Reported by: LIN Sumang <linsumang <at> gmail.com>
Date: Fri, 18 Mar 2011 13:34:02 UTC
Severity: normal
Merged with 8282,
35766
Fixed in version 27.1
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8283 in the body.
You can then email your comments to 8283 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8283
; Package
emacs
.
(Fri, 18 Mar 2011 13:34:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
LIN Sumang <linsumang <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 18 Mar 2011 13:34:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I wrote a simple function for *workaround*. Hope it helps.
(defun sgml-xml-auto-coding-function-utf (size)
(let* ((selected-coding (sgml-xml-auto-coding-function size))
(selected (symbol-name selected-coding))
(current-coding buffer-file-coding-system)
(current (symbol-name current-coding))
)
(if (and (string-match "^utf-" selected)
(string-match "^utf-.+\\(-with-signature.*\\)" current))
(if (string= selected (substring current 0 (length selected)))
current-coding
;; current=utf-cc-xxxx; selected=utf-ss; new -> utf-ss-xxxx
(let ((sig (match-string 1 current))
new)
(string-match "^utf-\\(.+\\)" selected)
(setq new (match-string 1 selected))
(setq new (intern (concat "utf-" new sig)))
(if (coding-system-p new)
new
selected-coding
)))
selected-coding))
)
On Fri, Mar 18, 2011 at 1:56 PM, LIN Sumang <linsumang <at> gmail.com> wrote:
> Hi,
>
> I am using Emacs 23.2.1. I think sgml-xml-auto-coding-function() should
> respect the *-with-signature-* coding.
>
> Consider the scenario below:
> 1. xml file with the signature \376\377 at beginning of the file and the
> first line is
> <?xml version="1.0" encoding="utf-16be"?>
> 2. edit this file and save it. sgml-xml-auto-coding-function will use the
> utf-16be to save the file.
> 3. open the file again, get messed.
>
> In this case sgml-xml-auto-coding-function() shouldn't change the coding
> and if it really need to change the coding, it should append the
> *-with-signature-* to the selected coding.
>
> sgml-html-meta-auto-coding-function() should have same problem.
>
>
>
[Message part 2 (text/html, inline)]
Merged 8282 8283.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 18 Mar 2011 17:04:01 GMT)
Full text and
rfc822 format available.
Merged 8282 8283 35766.
Request was from
Eli Zaretskii <eliz <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sat, 18 May 2019 07:27:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
35766 <at> debbugs.gnu.org and J S <jszabo_98 <at> hotmail.com>
Request was from
Eli Zaretskii <eliz <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sat, 18 May 2019 07:45:02 GMT)
Full text and
rfc822 format available.
bug Marked as fixed in versions 27.1.
Request was from
Noam Postavsky <npostavs <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Sat, 18 May 2019 11:30:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 17 Jun 2019 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 62 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.