www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2121] New: std.conv.to doesn't know about std.encoding

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2121

           Summary: std.conv.to doesn't know about std.encoding
           Product: D
           Version: 2.013
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: caron800 googlemail.com


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.


-- 
May 22 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2121


Andrei Alexandrescu <andrei metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |andrei metalanguage.com
         AssignedTo|nobody puremagic.com        |andrei metalanguage.com


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 11 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2121


Andrei Alexandrescu <andrei metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |INVALID


--- Comment #1 from Andrei Alexandrescu <andrei metalanguage.com> 2010-09-26
06:57:30 PDT ---
Invalidated by the upcoming demise of std.encoding.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 26 2010