Bug #30


Need iconv

Added by Garrett D'Amore almost 14 years ago. Updated over 7 years ago.

Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:
External Bug:


We need a working iconv implementation. The GNU version may be usable, but note that we already have about half (or more!) of the needed in our libc and supporting utilities. I think a new/separate implementation of iconv may be better


iconv.c (3.56 KB) iconv.c Gordon Ross, 2011-01-17 07:18 PM
iconv-l.ksh (1.42 KB) iconv-l.ksh Gordon Ross, 2011-01-17 07:18 PM
Actions #1

Updated by Garrett D'Amore almost 14 years ago

  • Project changed from site to illumos gate
Actions #2

Updated by Roland Mainz over 13 years ago

Garrett: Should I assign the bug to me ? I have prototype code floating around...

Actions #3

Updated by Roland Mainz over 13 years ago

  • Assignee set to Roland Mainz
  • % Done changed from 0 to 20

Taking bug myself...
... first I do /usr/bin/iconv ... but we need a 2nd bug to cover the individual iconv conversion modules.

Actions #4

Updated by Gordon Ross over 13 years ago

Here is some code to get someone started.
Still quite a bit todo though.

The hard part will be handling charmap files. For that,
see the code in $SRC/cmd/localedef

Actions #5

Updated by David Höppner about 11 years ago

  • Difficulty set to Medium
  • Tags set to needs-triage

Working on it.

Actions #6

Updated by Rich Lowe about 11 years ago

  • Assignee deleted (Roland Mainz)
  • Tags deleted (needs-triage)

I think that the code Gordon attached, above, may not be his most up-to-date code. He has some code that I'd actually reviewed and I think been happy with, but he hadn't really tested. You may want to sync up with him, at least to find the state of things?

Actions #7

Updated by Gordon Ross about 11 years ago

There's some reasonably complete (and somewhat tested) code here:

Reviewers recommended that it should have some tests written to
show that it works as well as the closed version. Sorry but I don't
have time to work on those tests. Volunteers?

Actions #8

Updated by David Höppner about 11 years ago

I wrote similar code the last 2 days :( :( :( Redmine dont even send me the new comments...

I rewrote the shell script in C maybe this is of use. WIDTH and WIDTH_DEFAULT are missing, but they are also missing in localedef(1)

<A> 1

If i recover from my disappointment, i maybe can take a look.

Actions #10

Updated by Electric Monk over 7 years ago

  • Status changed from New to Closed
  • % Done changed from 20 to 100

git commit 48edc7cf07b5dccc3ad84bf2dafe4150bd666d60

commit  48edc7cf07b5dccc3ad84bf2dafe4150bd666d60
Author: Gordon Ross <>
Date:   2016-10-24T18:17:22.000Z

    30 Need iconv
    Reviewed by: Robert Mustacchi <>
    Reviewed by: Patrick Mooney <>
    Reviewed by: Yuri Pankov <>
    Approved by: Dan McDonald <>


Also available in: Atom PDF