I am using iconv installed with macports as well as the default iconv that comes with OSX. I want to use a certain encoding - sjis-win, which is not one of the supported encodings. On Linux, there are many more supported encodings.

So I am wondering if I need to reinstall iconv or if there is a way to enable more encodings.

link|improve this question
feedback

1 Answer

up vote 3 down vote accepted

OS X 10.6's system-provided iconv does have the sjis-win encoding, but it's not aliased to that name.

On FreeBSD:

$ iconv -l | grep -i sjis-win
CP932 MS932 SHIFT_JIS-MS SJIS-MS SJIS-OPEN SJIS-WIN WINDOWS-31J WINDOWS-932 CSWINDOWS31J

Those are all the aliases of sjis-win. We see that this encoding is also known as code page 932. So on OS X:

$ iconv -l | grep 932
CP932

The version of iconv included in OS X does have the sjis-win encoding, but you need to refer to it as cp932 because that's the only alias listed.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.