perl-unicode

Translating a Latin-1 string to a UTF8 string in Perl 5.6.1

2001-12-11 18:00:34
Now that Perl 5.6.1 has removed support for tr///CU, is there still
an easy way to take a latin-1 character string and convert it to
a UTF8 string? I need to do that for generating LDIF files to load
into an LDAP server. 

I saw mention of using pack('U0',...), but I can't figure out how that
actually works. E.g. Given a variable $string with a value of 'Áine', I'd
like to get the corresponding string in utf8.

--
Michael A. Grady                             m-grady(_at_)uiuc(_dot_)edu
Senior Research Programmer                   http://ljordal.cso.uiuc.edu 
Computing & Communications Services Office   (217) 244-1253  phone
University of Illinois at Urbana-Champaign   (217) 265-5635  fax
Rm. 103, MC 680, 2212 Fox Drive, Suite C     Champaign, IL 61820

<Prev in Thread] Current Thread [Next in Thread>