Re: Diacritic Signs

Hi Stephen,

Use the Unicode::Lite module from CPAN.

    require Unicode::Lite;
    *lat2uni = convertor( 'latin1', 'utf8' );
    print lat2uni($text);

Cheers,
-kls

On Wed, Jan 22, 2003 at 01:25:06PM -0500, Stephen K. Rhoads wrote:
> 
> So, I added the "iso-8859-1" encoding declaration, and it worked, but ONLY
> when I retrieved the RDF document from a web server using the "Parse URI"
> feature in the RDF Validator.  When I cut and paste via a browser window, I
> get the same error.  Any thoughts as to why?
> 
> Also, I anticipate adding additional languages in the future which go beyond
> the characters in 8859.  Thus I would prefer to generate files encoded in
> UTF-8.  Any tips on how to do this?  I'm using PERL and various text editors
> to generate my XML.
> 
> --- Stephen
> 
> 
> ----- Original Message -----
> From: "Chris Olds" <colds@dydax.com>
> To: "Stephen K. Rhoads" <rhoads@thrupoint.net>
> Cc: <www-rdf-interest@w3.org>
> Sent: Tuesday, January 21, 2003 8:11 PM
> Subject: Re: Diacritic Signs
> 
> 
> 
> On Tue, 21 Jan 2003, Stephen K. Rhoads wrote:
> >
> > Does RDF (or XML, I suppose) have a problem with diacritic signs?  The W3
> > RDF Validator chokes on the "é" in "République" in the RDF fragment below.
> 
> The default encoding for XML is UTF-8.  The "é" in "République" has the
> high bit set, but is not a legal UTF-8 sequence (because it is, in fact,
> a simple 8859-1 (or perhaps -15) accented character).
> 
> Solutions: Add an encoding declaration to your XML file, or encode it as
> UTF-8.
> 
> /cco

-- 
          //                               .--=,
 .....::://::::::::::::::::::::::::::::.. (o O &   kevin_smathers@hp.com
:::::::://:::://://://:/:://::||_//       / V  K   
 :::::://:::://:/:|//'/' // _,|'         r ,  'qk   
  :'''/____ // /  //  |_// // ||        .'~.  .~`, 
                                   kls   \_/-=\_/

Received on Wednesday, 22 January 2003 14:19:55 UTC