User Tools

Site Tools


private:encodingerrorduringsvnupdate

SVN checkout notifies an encoding problem (svn: Can't convert string from 'UTF-8' to native encoding)

Problem

While creating a new local copy with SVN on a new machine (e.g. a cluster, Guillaume Lagarrigues, 30.11.2015), an error message may occur (e.g. below)

It seems this may happen under some UNIX machines.

svn: Can't convert string from 'UTF-8' to native encoding:
svn: data/stretch/testHB-sans-trou?\195?\169e-sans_tore-mmr 

Searching deeper under Unix

Check what version of UNIX runs the system

> cat /proc/version 

Linux version 2.6.32-279.5.2.bl6.Bull.33.x86_64 (hpcdelivery@atlas.frec.bull.fr) (gcc version 4.4.6 20120305 (Bull 4.4.6-4) (GCC) ) #1 SMP Sat Nov 10 01:48:00 CET 2012 

Check if the terminal is Unicode (yes if 'é' is returned)

> printf '\xc3\xa9\n' 

é

Check the locale command

> locale 

LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL= 

Solution

In this case, the value of LC_CTYPE must be changed to tell the programs which language / encoding they should consider for their text input / output

> LC_CTYPE=fr_FR.UTF-8;export LC_CTYPE 

Then retry the SVN checkout, should be ok.

private/encodingerrorduringsvnupdate.txt · Last modified: 2021/12/17 09:22 by 127.0.0.1