[Geoprisma-dev] Committers : please use UTF-8 encoding

Stephen Woodbridge woodbri at swoodbridge.com
Tue Jan 26 08:56:02 EST 2010


Alexandre Dube wrote:
> Yves,
> 
>  Thanks for the pointer.  That's a useful info.  Is there a quick way to 
> know which files are badly encoded ?

A quick and dirt test on Linux is:

  $ file test.php

This will output a string indicating encoding, but I think it only 
checks the first 2000 characters or something like that.

A more fool proof way is:

  $ iconv -f utf8 -t utf8 test.php > /dev/null

this will complain to stderr if there are problems.

HTH,
   -Steve


> Alexandre
> 
> 
> Yves Moisan wrote:
>> Hi All,
>>
>> This is targeted to SVN committers.  We used to have an SVN pre-commit
>> hook that enforced a character encoding check on all php, xslt, xml and
>> js files to make sure they were all using UTF-8.  We cannot implement
>> the hook on the OSGeo infrastructure due to its using an old Python
>> version (old linux distro) so now we have to rely on committer
>> self-discipline to ensure NO latin1 (aka ISO-8859-1) shows up in those
>> file types.  I saw a couple of occurrences that I would like people
>> working on windows to clean up.
>>
>> Thanx for your cooperation,
>>
>> Yves
>>
>> _______________________________________________
>> Geoprisma-dev mailing list
>> Geoprisma-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geoprisma-dev
>>   
> 
> 




More information about the Geoprisma-dev mailing list