Opened 9 years ago

Closed 4 years 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 Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

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 9 years ago by igloo

Description: modified (diff)
difficulty: Unknown

comment:2 Changed 9 years ago by igloo

Milestone: 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 8 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:4 Changed 8 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:5 Changed 8 years ago by igloo

Milestone: 6.10 branch6.12 branch

comment:6 Changed 7 years ago by igloo

Milestone: 6.12 branch6.12.3

comment:7 Changed 7 years ago by igloo

Milestone: 6.12.36.14.1
Priority: normallow

comment:8 Changed 6 years ago by igloo

Milestone: 7.0.17.0.2

comment:9 Changed 6 years ago by igloo

Milestone: 7.0.27.2.1

comment:10 Changed 5 years ago by igloo

Milestone: 7.2.17.4.1

comment:11 Changed 5 years ago by igloo

Milestone: 7.4.17.6.1
Priority: lowlowest

comment:12 Changed 4 years ago by igloo

Milestone: 7.6.17.6.2

comment:13 Changed 4 years ago by morabbin

Type of failure: 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 4 years ago by shachaf

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.