wanted: sb-ext:source-external-format

Bug #727623 reported by Nikodemus Siivola
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Triaged
Low
Unassigned

Bug Description

Sticking

 (sb-ext:source-external-format :utf-8)

a the toplevel in a file should change the external format used to compile/load that file from that point on.

Revision history for this message
Alastair Bridgewater (alastair-bridgewater) wrote : Re: [Bug 727623] [NEW] wanted: sb-ext:source-external-format

A few things:

  First, how do you make this work for utf-16?

  Second, can you make this work for arbitrary input prior to the
first such form in a file (especially arbitrary encoded characters in
comments)?

  Third, how do you handle an external-format change that alters the
encoded character width (switching from utf-16 to utf-8 in the middle
of a file... or vice versa)?

  Fourth, what about when the encoding directive /lies/? This isn't
quite as far-fetched as I'd like, as I've dealt with systems which
take a UTF-8 encoded XML message and transcode it to UTF-16 during
various processing, and then see the encoding specified as UTF-8 in
the header still. Not pretty. Or do the same with, say, latin-1 or
shift-jis and utf-8.

Revision history for this message
James Y Knight (foom) wrote :

Wouldn't it be better to do charset sniffing ala python2?
http://www.python.org/dev/peps/pep-0263/

Revision history for this message
Douglas Katzman (dougk) wrote :

Now that UTF-8 is the assumed default, this seems less important.

Changed in sbcl:
importance: Medium → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.