Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iconv: conversion from X-UNKNOWN unsupported #50

Closed
zemanel opened this issue Dec 3, 2015 · 6 comments
Closed

iconv: conversion from X-UNKNOWN unsupported #50

zemanel opened this issue Dec 3, 2015 · 6 comments

Comments

@zemanel
Copy link

zemanel commented Dec 3, 2015

Checked out the latest version but i get this error when running $ rdmd dfeed

<...>
NNTP-Downloader: 2408 messages in group digitalmars.D.ldc.
NNTP-Downloader: < ARTICLE 1133
NNTP-Downloader: > 211 29502 1 29714 D
NNTP-Downloader: < ARTICLE 1134
NNTP-Downloader: > 220 1071 <Pine.GSO.4.02.10108300533040.9049-100000@elf.comlab> article
NNTP-Downloader: > Path: digitalmars.com!elf.comlab!yqz
NNTP-Downloader: > From: Yu Qian Zhou <yqz@comlab.ox.ac.uk>
NNTP-Downloader: > Newsgroups: D
NNTP-Downloader: > Subject: How to avoid code duplication in D? MI/CI/delegation/C&P?
NNTP-Downloader: > Date: Thu, 30 Aug 2001 06:06:50 +0100
NNTP-Downloader: > Organization: Digital Mars
NNTP-Downloader: > Lines: 125
NNTP-Downloader: > Sender: yqz@elf.comlab
NNTP-Downloader: > Message-ID: <Pine.GSO.4.02.10108300533040.9049-100000@elf.comlab>
NNTP-Downloader: > Mime-Version: 1.0
NNTP-Downloader: > Content-Type: TEXT/PLAIN; charset=X-UNKNOWN
NNTP-Downloader: > Content-Transfer-Encoding: QUOTED-PRINTABLE
NNTP-Downloader: > X-Trace: digitaldaemon.com 999147976 26341 163.1.27.82 (30 Aug 2001 05:06:16 GMT)
NNTP-Downloader: > X-Complaints-To: usenet@digitalmars.com
NNTP-Downloader: > NNTP-Posting-Date: Thu, 30 Aug 2001 05:06:16 +0000 (UTC)
NNTP-Downloader: > In-Reply-To: <9mkd19$mt6$2@digitaldaemon.com>
NNTP-Downloader: > Xref: digitalmars.com D:1071
NNTP-Downloader: >
NNTP-Downloader: >
NNTP-Downloader: > Admittedly Java's single inheritance is easy to implement, and simple to
NNTP-Downloader: > use.  But it does have some defect which sometimes force a programmer to
NNTP-Downloader: > duplicate code by 'copy & paste':
NNTP-Downloader: >
NNTP-Downloader: > Suppose I have two classes 'Car' and 'Dog', which *have already inherited*
NNTP-Downloader: > from some more important classes 'Vehicle' and 'Animal' respectively
NNTP-Downloader: > (let's assume that 'Vehicle' and 'Dog' do not have a common modifiable
NNTP-Downloader: > ancestor); now I want both these two classes to implement another
NNTP-Downloader: > interface 'Idable', how can I do it?
NNTP-Downloader: >
NNTP-Downloader: > Answer:
NNTP-Downloader: > =09  Java: Copy & Paste,               code duplication !!!
NNTP-Downloader: > =09   C++: Multiple inheritance,    no code duplication
NNTP-Downloader: > =09   C++: Textual code inclusion,  no code duplication
NNTP-Downloader: > =09Eiffel: Multiple inheritance,    no code duplication
NNTP-Downloader: > =09Sather: Semantic code inclusion, no code duplication
NNTP-Downloader: >           Kiev: MI by delegation,        no code duplication
NNTP-Downloader: >
NNTP-Downloader: > so what's the solution D can provide?
NNTP-Downloader: >
NNTP-Downloader: > =09     D: ???                         code duplication ???
NNTP-Downloader: >
NNTP-Downloader: > D borrowed DbC from Eiffel, perhaps it also worth to check the multiple
NNTP-Downloader: > inheritance mechanism of Eiffel, which is much cleaner than C++ (by
NNTP-Downloader: > renaming and redefinition).
NNTP-Downloader: >
NNTP-Downloader: > Or if you still feel strongly against MI, maybe you can also consider
NNTP-Downloader: > Sather's semantic code inclusion, or Kiev's forward-able delegation?
NNTP-Downloader: >
NNTP-Downloader: > Let me know your thoughts on this.
NNTP-Downloader: >
NNTP-Downloader: > YuQian
NNTP-Downloader: >
NNTP-Downloader: >
NNTP-Downloader: > Sample code:
NNTP-Downloader: > /***********************************************************************
NNTP-Downloader: >   Java: Copy & Paste, code duplication
NNTP-Downloader: > ***********************************************************************/
NNTP-Downloader: > interface Idable
NNTP-Downloader: > {
NNTP-Downloader: >   public   void setId(int i);
NNTP-Downloader: >   public   void getId();
NNTP-Downloader: > }
NNTP-Downloader: >
NNTP-Downloader: > class      Car
NNTP-Downloader: > extends    Vehicle
NNTP-Downloader: > implements Idable
NNTP-Downloader: > {
NNTP-Downloader: >   private  int id;
NNTP-Downloader: >   public   void setId(int i) { id =3D i;   }      =20
NNTP-Downloader: >   public   void getId()      { return i; }
NNTP-Downloader: > }
NNTP-Downloader: >
NNTP-Downloader: >
NNTP-Downloader: > class      Dog=20
NNTP-Downloader: > extends    Animal
NNTP-Downloader: > implements Idable
NNTP-Downloader: > {
NNTP-Downloader: >   private  int id;=09=09=09=09// copy
NNTP-Downloader: >   public   void setId(int i) { id =3D i;   }    =09// &
NNTP-Downloader: >   public   void getId()      { return i; }    =09// paste!
NNTP-Downloader: > }
NNTP-Downloader: >
NNTP-Downloader: > /***********************************************************************
NNTP-Downloader: >   Kiev:  Multiple inheritance by delegation, no code duplication
NNTP-Downloader: > ***********************************************************************/
NNTP-Downloader: > class Id
NNTP-Downloader: > {
NNTP-Downloader: > private int id;
NNTP-Downloader: > public  void setId(int i) { id =3D i;   }      =20
NNTP-Downloader: > public  void getId()      { return i; }
NNTP-Downloader: > }
NNTP-Downloader: >
NNTP-Downloader: > class  =A0Car=A0
NNTP-Downloader: > extends Vehicle
NNTP-Downloader: > {
NNTP-Downloader: > =A0=A0=A0=A0forward=A0public=A0Id myId;   // forward car.getId() to car.myI=
NNTP-Downloader: > d.getId()
NNTP-Downloader: > }
NNTP-Downloader: >
NNTP-Downloader: > class  =A0Dog
NNTP-Downloader: > extends Animal
NNTP-Downloader: > {
NNTP-Downloader: > =A0=A0=A0=A0forward=A0public=A0Id myId;   // forward dog.getId() to dog.myI=
NNTP-Downloader: > d.getId()
NNTP-Downloader: > }
NNTP-Downloader: >
NNTP-Downloader: > /***********************************************************************
NNTP-Downloader: >   C++:  Multiple inheritance, no code duplication
NNTP-Downloader: > ***********************************************************************/
NNTP-Downloader: > class Idable
NNTP-Downloader: > {
NNTP-Downloader: > private: int id;
NNTP-Downloader: > public:
NNTP-Downloader: >    void setId(int i) { id =3D i;   }      =20
NNTP-Downloader: >    void getId()      { return i; }
NNTP-Downloader: > };
NNTP-Downloader: >
NNTP-Downloader: > class Car: public Vehicle, Idable {};
NNTP-Downloader: > class Dog: public Animal,  Idable {};
NNTP-Downloader: >
NNTP-Downloader: > /***********************************************************************
NNTP-Downloader: >   C++:  Textual code inclusion, no code duplication
NNTP-Downloader: > ***********************************************************************/
NNTP-Downloader: >
NNTP-Downloader: > //--- begin file: id.ci ---
NNTP-Downloader: > private: int id;
NNTP-Downloader: > public:
NNTP-Downloader: >    void setId(int i) { id =3D i;   }      =20
NNTP-Downloader: >    void getId()      { return i; }
NNTP-Downloader: > //--- end   file: id.ci ---
NNTP-Downloader: >
NNTP-Downloader: >
NNTP-Downloader: > class Car: public Vehicle
NNTP-Downloader: > {
NNTP-Downloader: > #include "id.ci"
NNTP-Downloader: > };
NNTP-Downloader: >
NNTP-Downloader: > class Dog: public Animal
NNTP-Downloader: > {
NNTP-Downloader: > #include "id.ci"
NNTP-Downloader: > };
NNTP-Downloader: >
NNTP-Downloader: >
NNTP-Downloader: > .
NNTP-Downloader: Got message 1071 (<Pine.GSO.4.02.10108300533040.9049-100000@elf.comlab>)
/usr/bin/iconv: conversion from X-UNKNOWN unsupported
/usr/bin/iconv: try '/usr/bin/iconv -l' to get the list of supported encodings
@CyberShadow
Copy link
Owner

iconv --version ?

@CyberShadow
Copy link
Owner

Never mind.

This should not be a fatal error. Is D exception handling working properly on the target platform you've built / are running DFeed on?

@zemanel
Copy link
Author

zemanel commented Dec 3, 2015

Hi. OSX 10.11.1

jose:DFeed/ (master*) $ iconv --version                                                                                                                                                                                                                      [15:54:57]
iconv (GNU libiconv 1.11)
Copyright (C) 2000-2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Bruno Haible.

jose:DFeed/ (master*) $ uname -a                                                                                                                                                                                                                             [15:55:02]
Darwin party-centre 15.0.0 Darwin Kernel Version 15.0.0: Sat Sep 19 15:53:46 PDT 2015; root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64
jose:DFeed/ (master*) $

@zemanel
Copy link
Author

zemanel commented Dec 3, 2015

I just installed D through Homebrew and mot much else:

jose:DFeed/ (master*) $ brew info dmd                                                                                                                                                                                                                        [15:56:21]
dmd: stable 2.069.1 (bottled), devel 2.069.2-b1, HEAD
D programming language compiler for OS X
http://dlang.org
/usr/local/Cellar/dmd/2.069.1 (395 files, 50M) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/dmd.rb

@CyberShadow
Copy link
Owner

Just to clarify, it's just fine if you see this error in DFeed's output, as it will just parse the message with US-ASCII encoding OSLT and keep going. Does DFeed crash or is there some other problem?

@CyberShadow
Copy link
Owner

Closing since I understand that this was not a fatal error but was understood as such.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants