EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #03755


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: Diacrtic Encoding in EPrints Perl Programs (eprints_fields_automatic.pl)


Hi Greg

	It's because perl doesn't know your source code is encoded in utf-8.  There are a number of ways to fix this, and the following is one of them:

	# This is a handy place to make monographs and thesis default to
	# your insitution
	#
	{
		use utf8;
		$eprint->set_value( "institution", "École Polytechnique de Montréal" );
	}

	...and make sure the file is utf8 encoded (depends on your editor).  If you put the 'use utf8' in the braces, then it only applies inside that lexical scope.

	Let me know how it goes

--
Adam Field
Business Relationship Manager and Community Lead
EPrints Services




On 8 Jan 2015, at 15:45, Greg Whitney wrote:

> Hello,
> 
> I am definitely not a programmer, as the following question probably shows:
>  
> In the /data/eprints3/archives/Ecole/cfg/cfg.d/eprints_fields_automatic.pl program, we would like to insert our institution name by default:
>  
>                                                 # This is a handy place to make monographs and thesis default to
>                                                 # your insitution
>                                                 #
>                                                 $eprint->set_value( "institution", "Ecole Polytechnique de Montreal" );    
>  
>  
> The problem is that we have 2 French diacritics in the name : École Polytechnique de Montréal.
>  
> I have tried several variations of coding the É & é with 0 success…..
>  
> We have upgraded a test version to EPrints 3.3.12 [Schema 3.3.4], running on RedHat Linux version 2.6.32-504.3.3.el6.x86_64 (virtual server).
>  
> Thanks!
>  
>  
> Greg Whitney
> Section Head, Technical & Computer Services
> Polytechnique Montréal Library
> 2500, chemin de Polytechnique
> Montréal, QC
> Canada H3T-1J4
> 514-340-5121 x4646
> 514-340-4026 (Fax)
> greg.whitney@polymtl.ca
> 
>  
>  
>  
>  
>  
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: http://www.eprints.org/tech.php/
> *** EPrints community wiki: http://wiki.eprints.org/
> *** EPrints developers Forum: http://forum.eprints.org/