Opened 7 years ago

Closed 7 years ago

#1038 closed defect (fixed)

latin-1-unix not recognized as a valid encoding in -*- coding: -*-

Reported by: stassats Owned by: gb
Priority: normal Milestone:
Component: Runtime (threads, GC) Version: trunk
Keywords: Cc:


;;; -*- coding: latin-1-unix -*-

causes Unknown character encoding: :LATIN-1. That's because it expects LATIN1, but I'd also say that it shouldn't throw an error even if it's not recognized, just a warning.

Change History (2)

comment:1 Changed 7 years ago by gb

  • Owner set to gb
  • Status changed from new to assigned

Yeah. There are (at least) 2 issues here:

1) if one of the goals of parsing the file-options line is "increased Emacs compatibility", we should try to recognize at least a large subset of the names that Emacs uses for encoding names. 2) I think that I agree that WARNing is about right: if we can't recognize the encoding specified by the options line, we should bring that to the user's attention. Failure to get the encoding right might or might not be significant, and all that OPEN etc can really say is that it might be.

comment:2 Changed 7 years ago by gb

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [15545]) Define, export, and provide doc strings for DEFINE-CHARACTER-ENCODING-ALIAS and REMOVE-CHARACTER-ENCODING-ALIAS.

When parsing the "coding:" file option, warn (don't error) if the option's value isn't recognized (todo: handle this warning in the Cocoa IDE) and suggest use of DEFINE-CHARACTER-ENCODING-ALIAS in the warning.

Define Emacs-compatible aliases for :LATINn (:LATIN-n, :ISO-LATIN-n) and :UTF-8 (:MULE-UTF-8).

Fixes ticket:1038 in the trunk. (Failure to recognize "latin-1" apparently prevents some part of SLIME or SWANK from loading properly.)

Note: See TracTickets for help on using tickets.