Tanaka has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I'm currently being forced to use perl (5.00503) on a FreeBSD machine with only the default modules installed. They admins are also not willing to install any modules. The problem is that I have to use a CGI script to accept and process chinese characters.
$chinese_character_num = "12551"; $chinese_character = chr($chinese_character_num); print $chinese_character;
This returns a weird block-like character( ) which I assume means it doesn't know which character to give it. I have assume (again, I'm sorry) that the problem is the machine isn't using the unicode set, and isn't loading utf8 on demand. So, I then took the utf8 module and its required companion (utf8_heavy.pl) and threw them into the directory, and included them as follows:
use utf8 qw(-l ./);
Suprisingly, this ran without any errors, but when it tried the same code as before, I got the same result. I have tried this whole mess on my own server, with perl 5.6.1, and it works just like its designed to. Does anyone know what I can do to make it work on the FreeBSD server?

Replies are listed 'Best First'.
Re: Weird UTF stuff in FreeBSD
by dws (Chancellor) on Aug 16, 2002 at 03:05 UTC
    I'm currently being forced to use perl (5.00503) on a FreeBSD machine with only the default modules installed. They admins are also not willing to install any modules.

    This is an organizational problem, not a technical one. Try to solve it at the organizational level first. Push back. You need UTF8 support. For that you'll need a newer Perl. I suggest escalating this through your manager. Admins often respond to pressure from above. Creating pressure from above is one of the things managers can do. Use this to your advantage.