Actions:
|
2013-07-25 18:41 AEST by Arthur Barrett - Unfortunately, we have hit another problem that prevents us from getting any further: When we try to
check out a freshly imported copy of our CVS using the “pserver” protocol, an error message about
malformed XML is displayed:
Error in xml_read: not well-formed (invalid token) at line 59
cvsnt [server aborted]: Malformed fileattr.xml file in
/cvsnt/IHP/ehyp2/infinica/templates/objectFormulare/CVS. Please fix or delete this file
The error message is displayed with both the legacy CVS client as well as with the CVSNT client. Looking
at the contents of the fileattr.xml in question, it’s clear that the file pretends to contain characters
encoded in UTF-8:
sfoerster@cvsnt-eval$ head -1 /cvsnt/IHP/ehyp2/infinica/templates/objectFormulare/CVS/fileattr.xml
<?xml version="1.0" encoding="UTF-8"?>
Unfortunately, the file’s encoding is ISO8859-1 (or 15, irrelevant):
sfoerster@cvsnt-eval$ file -i !$
file -i /cvsnt/IHP/ehyp2/infinica/templates/objectFormulare/CVS/fileattr.xml
/cvsnt/IHP/ehyp2/infinica/templates/objectFormulare/CVS/fileattr.xml: application/xml; charset=iso-
8859-1
Traditionally, the “locale” setting for all our servers – and this includes the server that hosts our legacy
CVS installation as well as the CVSNT evaluation server – is “ISO8859-15”:
sfoerster@cvsnt-eval$ locale
LANG=de_DE@euro
LC_CTYPE="de_DE@euro"
LC_NUMERIC="de_DE@euro"
LC_TIME="de_DE@euro"
LC_COLLATE="de_DE@euro"
LC_MONETARY="de_DE@euro"
LC_MESSAGES="de_DE@euro"
LC_PAPER="de_DE@euro"
LC_NAME="de_DE@euro"
LC_ADDRESS="de_DE@euro"
LC_TELEPHONE="de_DE@euro"
LC_MEASUREMENT="de_DE@euro"
LC_IDENTIFICATION="de_DE@euro"
LC_ALL= |
|
2013-07-25 18:47 AEST by Arthur Barrett - To find the valid Locale string you can use a command similar to this:
[abarrett@vmdev ~]$ locale -a | grep 8859 | grep 15 | grep en
en_GB.iso885915
the fix should be a simple change to the linux PServer file.
#Locale=en_GB.UTF-8
Locale=Locale=de_DE.iso88591
This will be needed to the /etc/cvsnt/PServer file on any linux computer running cvsnt server not
configured with UTF8 as the default locale.
see:
http://www.cvsnt.org/pipermail/cvsnt/2005-October/022039.html
The cilent should automatically detect the locale and provide a translation to the server locale, but can
also be manually overridden:
cvs -oISO8859-15 rls
The fileattr.xml file only exists in the repository so I assume here that it's the server at fault. Generally
linux systems are all UTF8, and if a locale is 'specified' it only affects the UI (ie: the client).
In this case it seems as if CVSNT is unable to force the system to run itself as UTF8. This should be a rare
case, but it's probably worth fixing.
|
|
2013-07-25 18:57 AEST by Arthur Barrett - Bug fix should be to detect the 'current' locale and to set cvs_locale to that.
With some luck it's as simple as:
printf ("Locale is: %s\n", setlocale(LC_ALL,NULL) );
However we should also improve the installer to manually set the locale to UTF8
|