David Leuschner wrote:
If I write simple program just printing a non-ASCII string to the terminal
or to a file I'd expect that I can read it on the screen or using my
favorite text editor without having change anything -- neither in my
terminal nor in my program. When I run the program on my
Small correction:
I think ./prog in vs ./prog in and utf8 should be ok.
(and I thought this was switched to Glasgow-haskell-users@haskell.org)
David Leuschner wrote:
Let me try and summarise:
Thanks for the great summary! And thanks to Emacs' table mode here're the
results displayed as a
On Wed, Feb 27, 2008 at 1:06 AM, Duncan Coutts
[EMAIL PROTECTED] wrote:
As a data point, Java and python use always locale as default if you
don't specify an encoding when opening a text stream.
I think personally I'm coming round to the always locale point of
view. We already have no
- Original Message
From: Johan Tibell [EMAIL PROTECTED]
To: Duncan Coutts [EMAIL PROTECTED]
Cc: Haskell Libraries [EMAIL PROTECTED]; GHC-users list
Glasgow-haskell-users@haskell.org; Simon Marlow [EMAIL PROTECTED]
Sent: Wednesday, February 27, 2008 9:25:39 AM
Subject: Re: H98 Text
On Wed, 2008-02-27 at 08:54 +, Chris Kuklewicz wrote:
Small correction:
I think ./prog in vs ./prog in and utf8 should be ok.
Ah yes, quite right. Similarly ./prog -o out vs ./prog out because
neither involve printing to the terminal.
Duncan
Matthew Bentham wrote:
It’s not unreasonable to have a program that wants to encode its outputin a
particular encoding. The example I gave earlier still seemsreasonable to be, a program
that takes input in one encoding andrecodes to a different encoding on its output, with
both the input
I came to the same conclusions. I think using either the current
encoding or utf8 are perfectly reasonable interpretations of the
standard. Jhc used to use the current locale always, but now it uses
utf8 always as that was easier to make portable to other operating
systems. (though current locale
Duncan Coutts wrote:
From the H98 report:
All I/O functions defined here are character oriented. [...]
These functions cannot be used portably for binary I/O.
In the following, recall that String is a synonym for [Char]
(Section 6.1.2).
So ordinary
Duncan Coutts wrote:
So here is a concrete proposal:
* Haskell98 file IO should always use UTF-8.
* Haskell98 IO to terminals should use the current locale
encoding.
Personally, I'd find this deeply surprising. I don't care that much what
locale gets used for I/O (if it
On Tue, 2008-02-26 at 13:22 +, Simon Marlow wrote:
So some alternatives that fix this are
1. all text I/O is in the locale encoding (what C and Hugs do)
2. stdin/stdout/stderr and terminals are always in the locale
encoding, everything else is UTF-8
I was initially
On Wed, 2008-02-27 at 00:31 +1100, Roman Leshchinskiy wrote:
Duncan Coutts wrote:
So here is a concrete proposal:
* Haskell98 file IO should always use UTF-8.
* Haskell98 IO to terminals should use the current locale
encoding.
Personally, I'd find this deeply
Duncan Coutts wrote:
On Wed, 2008-02-27 at 00:31 +1100, Roman Leshchinskiy wrote:
Duncan Coutts wrote:
So here is a concrete proposal:
* Haskell98 file IO should always use UTF-8.
* Haskell98 IO to terminals should use the current locale
encoding.
Personally, I'd find this
Simon Marlow wrote:
Duncan Coutts wrote:
Let's call this one proposal 0:
* Haskell98 file IO should always use UTF-8.
* Haskell98 IO to terminals should use the current locale
encoding.
and the others:
1. all text I/O is in the locale encoding (what C and Hugs do)
Roman Leshchinskiy wrote:
Duncan Coutts wrote:
On Wed, 2008-02-27 at 00:31 +1100, Roman Leshchinskiy wrote:
Also, would this affect the encoding used for file names? If so, how?
No, that's a separate issue.
Hmm, so how do I reliably read a list of file names from a file?
You didn't say
Why not leave the defaults as they ARE OR USE utf-8 and give the
programmer the capability to specify what encoding they want when
they want to use a different one?
John
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
The H98 spec has the inside half of story nailed down: Char is
Unicode, and Handles are text I/O that deal in [Char]. The outside
half of the story is the binary encoding of the [Char], which was
unspecified, and left to the implementation.
The implementation dependence allows GHC to create a
Op 26-feb-2008, om 18:42 heeft Chris Kuklewicz het volgende geschreven:
The goal is that more complicated situations are reflected in
more complicated ghc or main invocations. The least complicated
usage defaults to being identical cross-platform and regardless of
terminal I/O.
I think the
On Tue, 2008-02-26 at 07:28 -0800, John Meacham wrote:
On Tue, Feb 26, 2008 at 01:34:54PM +, Duncan Coutts wrote:
Personally I'm not really fussed about which compromise we pick. I think
the more important point is that all the Haskell implementations pick
the same compromise so that
Reinier Lamers wrote:
Op 26-feb-2008, om 18:42 heeft Chris Kuklewicz het volgende geschreven:
The goal is that more complicated situations are reflected in
more complicated ghc or main invocations. The least complicated
usage defaults to being identical cross-platform and regardless of
On Tue, 2008-02-26 at 14:18 +, Simon Marlow wrote:
Simon Marlow wrote:
Duncan Coutts wrote:
Let's call this one proposal 0:
* Haskell98 file IO should always use UTF-8.
* Haskell98 IO to terminals should use the current locale
encoding.
and the others:
20 matches
Mail list logo