D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 2121 - std.conv.to doesn't know about std.encoding
Summary: std.conv.to doesn't know about std.encoding
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: Andrei Alexandrescu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-22 07:24 UTC by Janice Caron
Modified: 2015-06-09 01:19 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Janice Caron 2008-05-22 07:24:23 UTC
The following does not work

    import std.conv;
    import std.encoding;

    string s = "hello world";
    AsciiString t = to!(AsciiString)(s);

However, it is perfectly possible to do the transoding by using std.encoding functions alone.

    import std.encoding;

    string s = "hello world";
    AsciiString t;
    transcode(s,t);

Please fix std.conv.to so that it recognises AsciiString, Latin1String and Windows1252String, and can transcode between all string types.
Comment 1 Andrei Alexandrescu 2010-09-26 06:57:30 UTC
Invalidated by the upcoming demise of std.encoding.