Ticket #690 (closed task: wontfix)

Opened 3 years ago

Last modified 2 months ago

Accept source files in encodings other than UTF-8

Reported by: simonmar Assigned to:
Priority: normal Milestone: 6.8.2
Component: Compiler Version: 6.5
Severity: normal Keywords:
Cc: Difficulty: Moderate (1 day)
Test Case: Operating System: Unknown/Multiple
Architecture: Unknown/Multiple

Description

We need to support at least Latin-1, for backwards compatibility.

One possibility is to run iconv as a preprocessor. Alternatively, call iconv directly from the compiler. What about Windows? Should there be a pragma specifying encoding, or take it from the locale, or a command-line flag, or all three?

Change History

09/25/06 06:26:27 changed by igloo

Duncan Coutts points out that, as a workaround, you can pass

-F -pgmF convert.sh

to GHC, where convert.sh contains

#!/bin/sh
( echo "{-# LINE 1 \"$2\" #-}" ; iconv -f l1 -t utf-8 $2 ) > $3

10/02/06 01:45:47 changed by simonmar

  • milestone changed from 6.6 to 6.6.1.

We documented the workaround using iconv for 6.6, this is unfortunately not a solution for Windows users. Punting a better solution to 6.6.1, or possibly 6.8.

10/20/06 14:59:14 changed by igloo

  • testcase changed.

See also 782.

11/17/06 06:40:59 changed by simonmar

  • milestone changed from 6.6.1 to 6.8.

11/12/07 06:07:21 changed by simonmar

  • status changed from new to closed.
  • resolution set to wontfix.

We don't plan to do anything here. Having source files in UTF-8 only means that source files are always shareable, which is a good thing.

12/14/07 09:17:19 changed by igloo

  • milestone changed from 6.8 branch to 6.8.2.

09/30/08 08:39:57 changed by simonmar

  • architecture changed from Unknown to Unknown/Multiple.

09/30/08 08:51:03 changed by simonmar

  • os changed from Unknown to Unknown/Multiple.