Opened 6 years ago

Closed 15 months ago

#2244 closed bug (fixed)

load in GHCi doesn't work with UTF-8 filenames

Reported by: malebria Owned by:
Priority: lowest Milestone: 7.6.2
Component: GHCi Version: 6.8.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description (last modified by igloo)

When I try to load a file with a UTF-8 character, I got:

Prelude> :load Público/codigo/haskell/Hora.hs

<no location info>: can't find file: P�blico/codigo/haskell/Hora.hs

With the command line it goes fine:

malebria@quindinho:~$ ghci Público/codigo/haskell/Hora.hs
GHCi, version 6.8.2: http://www.haskell.org/ghc/  :? for help
Loading package base ... linking ... done.
[1 of 1] Compiling Hora             ( Público/codigo/haskell/Hora.hs, interpreted )

Change History (14)

comment:1 Changed 6 years ago by igloo

  • Description modified (diff)
  • Difficulty set to Unknown

comment:2 Changed 6 years ago by igloo

  • Milestone set to 6.10 branch

Thanks for the report. I suspect that this is because the IO functions ignore all but the low 8 bits of Strings. We should do something to make this work.

comment:3 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:4 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple

comment:5 Changed 5 years ago by igloo

  • Milestone changed from 6.10 branch to 6.12 branch

comment:6 Changed 4 years ago by igloo

  • Milestone changed from 6.12 branch to 6.12.3

comment:7 Changed 4 years ago by igloo

  • Milestone changed from 6.12.3 to 6.14.1
  • Priority changed from normal to low

comment:8 Changed 3 years ago by igloo

  • Milestone changed from 7.0.1 to 7.0.2

comment:9 Changed 3 years ago by igloo

  • Milestone changed from 7.0.2 to 7.2.1

comment:10 Changed 3 years ago by igloo

  • Milestone changed from 7.2.1 to 7.4.1

comment:11 Changed 2 years ago by igloo

  • Milestone changed from 7.4.1 to 7.6.1
  • Priority changed from low to lowest

comment:12 Changed 20 months ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2

comment:13 Changed 15 months ago by morabbin

  • Type of failure set to None/Unknown

Works for me, GHCi 7.6.1 on Mac, on command line and from within GHCi:

Orac:~/work/ghc $ ls Bl*
Blörgle.hs
Orac:~/work/ghc $ ghci Blörgle.hs 
GHCi, version 7.6.1: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
[1 of 1] Compiling Main             ( Blörgle.hs, interpreted )
...
Orac:~/work/ghc $ ghci 
GHCi, version 7.6.1: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> :l Blörgle.hs 
[1 of 1] Compiling Main             ( Blörgle.hs, interpreted )

comment:14 Changed 15 months ago by shachaf

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

This was fixed sometime between 7.4.1 and 7.6.1 -- see #7551.

Note: See TracTickets for help on using tickets.