views:

225

answers:

3

I want to enable Encode::HanExtra on Windows XP environment. I can't find the name HanExtra or Encode-HanExtra in PPM GUI. Is there any alias name for it?

+1  A: 

Encode-HanExtra does exist according to this page but there is no Windows build. Some options:

  • Encode::CNMap can convert between many different Chinese encodings (gb2312, big5, utf8, gbk). ActivePerl name is Encode-CNMap.

  • There is an ActivePerl version of Encode::CN::Utility which can convert characters between Hanzi, GBK and Unicode/UTF-8. ActivePerl name is Encode-CN-Utility.

  • You could install Strawberry Perl instead of ActivePerl. This is a community distribution of Perl for Windows that uses CPAN, so any module on CPAN can be installed (except platform-dependent modules). After installing run cpan Encode::HanExtra.

  • You could build your own PPM version of Encode::HanExtra (not recommended)

rjh
Nano HE
It looks like it passes its tests on Windows: http://www.cpantesters.org/distro/E/Encode-HanExtra.html
brian d foy
@brian: I just started up ppm (ActivePerl 5.8.8) and Encode-HanExtra is not present. I've amended my answer.
rjh
@rjh, Thanks a lot for your input. I googled and found this post `http://stackoverflow.com/questions/1945221/how-can-i-embede-chinese-characters-in-my-perl-source`. That's why I want to install the package to practice the answer script.
Nano HE
+1  A: 

Is there some special reason that you want to use ActivePerl?

You might consider using Strawberry Perl so you can use the normal CPAN tools to install any module that you want, regardless if someone has created a package for you.

brian d foy
@brian, Thanks for your suggestion. Currently our company C sharp project(there are several perl script files) based on ActivePerl. That's why I am using it. As a perl newbie, I think it is enough for me. Maybe later, I would switch to Stawberry.
Nano HE
Is there any reason why CPAN should not be used with ActivePerl (apart from possible confusion of modules installed in different ways)
justintime
You have to use the same C compiler that compiled ActivePerl to install XS modules. For some people that's rather complicated.
brian d foy
Well... they have a MingW ppm that you can plug in now, and they build AP to be compatible with building XS modules using it, even though AP itself is built using VS. You could install that, and then use CPAN. But if it's on Trouchelle's repo, use that.
Curtis Jewell
+3  A: 

Encode::HanExtra is provided by Trouchelle's PPM repository, here for example built for ActiveState Perl 5.10: http://trouchelle.com/perl/ppmrepview.pl?l=E&v=10#Encode-HanExtra

daxim