[ ghc-Feature Requests-1212959 ] Reading source files in encodings other than Latin-1

SourceForge.net noreply at sourceforge.net
Fri Jun 3 04:08:27 EDT 2005


Feature Requests item #1212959, was opened at 2005-06-01 18:53
Message generated for change (Comment added) made by simonmar
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=358032&aid=1212959&group_id=8032

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: None
>Group: None
Status: Open
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
>Summary: Reading source files in encodings other than Latin-1

Initial Comment:
For GHC 6.4 on SuSE Linux 9.2 (installed from the GHC RPM).  
 
When including SOME non-ascii characters in character or 
string literals, in the source code, I get a "lexical error in 
string/character literal" error message. Examples are some 
french accents and german umlauts - é,Ü,Ä. However, with 
other characters from the same set (like üä) there is no 
problem, they are processed correctly 
 
I checked with Hugs and there were no problems, so it seems 
to be a GHC bug. 
 
For further questions send email to: Rainer Volz, mail at 
vrtprj.com 
 
 
 
 
 

----------------------------------------------------------------------

>Comment By: Simon Marlow (simonmar)
Date: 2005-06-03 08:29

Message:
Logged In: YES 
user_id=48280

I don't know about wxHaskell, it's possible that it is using
your system's default encoding.

Thanks for the report anyway.  I'll re-brand it as a feature
request.


----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2005-06-02 16:24

Message:
Logged In: NO 

Ah ok, I read so much about Haskell and Unicode that I didn't think 
about that. My system uses UTF-8 as standard encoding, so Emacs 
saves the source file also in that encoding. 
 
Using ISO-8859-1 as encoding to save the file helps with the lexical 
error. However the strings are still not displayed correctly. I tried it 
with texts in wxhaskell windows and with simple putStr "Üo" scripts.  
 
Do I have to change my system's encoding to IOS8859-1 to get 
proper results? 

----------------------------------------------------------------------

Comment By: Simon Marlow (simonmar)
Date: 2005-06-02 08:32

Message:
Logged In: YES 
user_id=48280

It works fine for me.  What encoding are you using?  GHC
only understands the Latin-1 (ISO8859-1) encoding for source
files.  If you are using Latin-1, then please attach a
source file that we can test.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=358032&aid=1212959&group_id=8032


More information about the Glasgow-haskell-users mailing list