Ticket #2811 (closed feature request: fixed)

Opened 5 years ago

Last modified 4 years ago

Unicode support for text I/O

Reported by: igloo Owned by: simonmar
Priority: high Milestone: 6.12.1
Component: libraries/base Version: 6.10.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

This means adding Unicode encoding/decoding for Text I/O handles.

Consensus was that Text I/O should always use the current locale encoding.

You can elect to have no encoding by opening in binary mode, but that's all.

Presumably this will need the ability to convert between arbitrary encodings internally, so it would make sense to also expose this functionality as a library.

Change History

in reply to: ↑ description   Changed 5 years ago by duncan

Replying to igloo:

You can elect to have no encoding by opening in binary mode, but that's all.

With the existing H98 and System.IO api, yes.

Presumably this will need the ability to convert between arbitrary encodings internally, so it would make sense to also expose this functionality as a library.

Not arbitrary character sets or encodings thereof, just to and from Unicode.

Note that there is already a library that provides converting between pairs of character sets and encodings - the iconv package on hackage. We could probably make another lib that provides a portable lowest common denominator of that and the Win32 encodings API.

  Changed 4 years ago by igloo

  • milestone changed from 6.12 branch to 6.12.1

  Changed 4 years ago by simonmar

  • status changed from new to closed
  • resolution set to fixed

Done.

Fri Jun 12 06:56:31 PDT 2009  Simon Marlow <marlowsd@gmail.com>
  * Rewrite of the IO library, including Unicode support
Note: See TracTickets for help on using tickets.