[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

i18n hell.

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2002-07-11 20:55:52 CEST

So I compiled subversion with --enable-utf8, and suddenly started
getting errors on *every* invocation of 'svn':

apr_error: #22, src_err 0 : <Invalid argument>
  (charset translator procurement failed)

So I traced into our call to apr/i18n/unix/xlate.capr_xlate_open().

This function had "UTF-8" passed in already, and the value
APR_LOCALE_CHARSET caused the code to run nl_langinfo(CODESET). The
return value from nl_langinfo was "ISO8859-1".

Then we call iconv_open() on these two strings: bam, I get an EINVAL
error. What's invalid, you ask?

It turns out that my iconv only accepts "ISO-8859-1", not "ISO8859-1":

$ man iconv_open
...
European languages
              ASCII, ISO-8859-{1,2,3,4,5,7,9,10,13,14,15,16},
...

$ iconv -f UTF-8 -t ISO8859-1 foo
iconv: conversion to ISO8859-1 unsupported
$ iconv -f UTF-8 -t ISO-8859-1 foo
iconv: foo: No such file or directory

This seems way screwed up to me. The unhyphenated codepage name came
from nl_langinfo(), which is part of my FreeBSD 4.5 libc! And this
isn't accepted by iconv??

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jul 11 21:00:23 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.