W3C home > Mailing lists > Public > www-rdf-interest@w3.org > January 2003

Re: Diacritic Signs

From: Kevin Smathers <ks@micky.hpl.hp.com>
Date: Wed, 22 Jan 2003 11:24:04 -0800
To: "Stephen K. Rhoads" <rhoads@thrupoint.net>
Cc: cco@dydax.com, www-rdf-interest@w3.org
Message-ID: <20030122112404.B13981@micky.hpl.hp.com>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:57 GMT