Discussion:
Could not load a transcoding service - Linux
Paul Leeming
2009-09-16 08:26:56 UTC
Permalink
Hi,

I am attempting to use Xerces on a Set Top Box development kit, running Linux. I have tested the code on an Linux PC and it works fine. However, when I try to run it on my target device the XMLPlatformUtils::Initialize() it fails with "Could not load a transcoding service".

The Xerces code is compiled with --enable-transcoder-gnuiconv, and I have also tried -iconv and -icu but the code will not build as it seems these are not available on my system.

Using a debugger, the problem seems to be when calling

XMLPlatformUtils::Initialize()
{

which calls

XMLPlatformUtils::makeTransService()


which then calls

tc = new IconvGNUTransService(fgMemoryManager);

This fails in the constructor, in the overloaded new operator of XMemory


I have also cross compiled one of the examples which came with Xerces, and this fails in the same way.

Has anyone had a similar problem, or have any ideas?

Thanks in advance

Paul
Boris Kolpackov
2009-09-19 17:08:32 UTC
Permalink
Hi Paul,
Post by Paul Leeming
tc = new IconvGNUTransService(fgMemoryManager);
This fails in the constructor, in the overloaded new operator of XMemory
Can you find out where exactly in IconvGNUTransService constructor
it fails? My guess would be that GNU Iconv on your target does not
support encodings that are needed by Xerces-C++.

One way to address this is to build and use ICU. I have done that
for LynxOS though cross-compiling ICU is not easy.

Boris
--
Boris Kolpackov, Code Synthesis Tools http://codesynthesis.com/~boris/blog
Open-source XML data binding for C++: http://codesynthesis.com/products/xsd
XML data binding for embedded systems: http://codesynthesis.com/products/xsde
Paul Leeming
2009-09-22 07:44:14 UTC
Permalink
Hey Boris,

Thanks for the reply. I have done some more digging and I think you are right, I actually get a failure returned from the iconv_open function, which suggests that I don't have the required transcoding service. My code is attempting to transcode from iso-8859-1 to UTF-16LE.

However, it is very confusing that if I run iconv from the command line on my target device using the same from and to arguments it works fine. For example:

# iconv -f iso-8859-1 -t UTF-16LE ExampleXML.txt

So I have been trying to find the difference between the command line app (iconv) and my code. No luck yet. If I don't get anywhere with this I think I might try ICU as you suggest.

Paul



-----Original Message-----
From: Boris Kolpackov [mailto:***@codesynthesis.com]
Sent: Sat 9/19/2009 18:08
To: c-***@xerces.apache.org
Subject: Re: Could not load a transcoding service - Linux

Hi Paul,
Post by Paul Leeming
tc = new IconvGNUTransService(fgMemoryManager);
This fails in the constructor, in the overloaded new operator of XMemory
Can you find out where exactly in IconvGNUTransService constructor
it fails? My guess would be that GNU Iconv on your target does not
support encodings that are needed by Xerces-C++.

One way to address this is to build and use ICU. I have done that
for LynxOS though cross-compiling ICU is not easy.

Boris
--
Boris Kolpackov, Code Synthesis Tools http://codesynthesis.com/~boris/blog
Open-source XML data binding for C++: http://codesynthesis.com/products/xsd
XML data binding for embedded systems: http://codesynthesis.com/products/xsde
David S.
2009-11-17 23:59:31 UTC
Permalink
Post by Paul Leeming
Hi,
I am attempting to use Xerces on a Set Top Box development kit, running
Linux. I have tested the code on an Linux PC and it works fine. However,
when I try to run it on my target device the
XMLPlatformUtils::Initialize() it fails with "Could not load a transcoding
service".
The Xerces code is compiled with --enable-transcoder-gnuiconv, and I have
also tried -iconv and -icu but the code will not build as it seems these
are not available on my system.
Using a debugger, the problem seems to be when calling
XMLPlatformUtils::Initialize()
{
which calls
XMLPlatformUtils::makeTransService()
which then calls
tc = new IconvGNUTransService(fgMemoryManager);
This fails in the constructor, in the overloaded new operator of XMemory
I have also cross compiled one of the examples which came with Xerces, and
this fails in the same way.
Has anyone had a similar problem, or have any ideas?
Thanks in advance
Paul
GNU iconv needs files from /usr/lib/gconv in order to work with Xerces. Is
the directory present on your target system?
--
View this message in context: http://old.nabble.com/Could-not-load-a-transcoding-service---Linux-tp25468057p26400086.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.
DMJ1
2011-01-07 14:06:24 UTC
Permalink
Post by David S.
Post by Paul Leeming
Hi,
I am attempting to use Xerces on a Set Top Box development kit, running
Linux. I have tested the code on an Linux PC and it works fine. However,
when I try to run it on my target device the
XMLPlatformUtils::Initialize() it fails with "Could not load a
transcoding service".
The Xerces code is compiled with --enable-transcoder-gnuiconv, and I have
also tried -iconv and -icu but the code will not build as it seems these
are not available on my system.
Using a debugger, the problem seems to be when calling
XMLPlatformUtils::Initialize()
{
which calls
XMLPlatformUtils::makeTransService()
which then calls
tc = new IconvGNUTransService(fgMemoryManager);
This fails in the constructor, in the overloaded new operator of XMemory
I have also cross compiled one of the examples which came with Xerces,
and this fails in the same way.
Has anyone had a similar problem, or have any ideas?
Thanks in advance
Paul
GNU iconv needs files from /usr/lib/gconv in order to work with Xerces. Is
the directory present on your target system?
I am having similar problems. I have built my libxerces library and provided
it on the target system. The target system has the /usr/lib/gconv and can
successfully translate the when I pass the file using iconv with right
parameters. However, the code always spits out the error:
could not load a transcoding service

Has this been resolved? If so can you please provide a recipe?

-- DMJ1
--
View this message in context: http://old.nabble.com/Could-not-load-a-transcoding-service---Linux-tp25468057p30614545.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.
David S.
2011-01-10 21:55:07 UTC
Permalink
Post by DMJ1
Post by David S.
Post by Paul Leeming
Hi,
I am attempting to use Xerces on a Set Top Box development kit, running
Linux. I have tested the code on an Linux PC and it works fine. However,
when I try to run it on my target device the
XMLPlatformUtils::Initialize() it fails with "Could not load a
transcoding service".
The Xerces code is compiled with --enable-transcoder-gnuiconv, and I
have also tried -iconv and -icu but the code will not build as it seems
these are not available on my system.
Using a debugger, the problem seems to be when calling
XMLPlatformUtils::Initialize()
{
which calls
XMLPlatformUtils::makeTransService()
which then calls
tc = new IconvGNUTransService(fgMemoryManager);
This fails in the constructor, in the overloaded new operator of XMemory
I have also cross compiled one of the examples which came with Xerces,
and this fails in the same way.
Has anyone had a similar problem, or have any ideas?
Thanks in advance
Paul
GNU iconv needs files from /usr/lib/gconv in order to work with Xerces.
Is the directory present on your target system?
I am having similar problems. I have built my libxerces library and
provided it on the target system. The target system has the /usr/lib/gconv
and can successfully translate the when I pass the file using iconv with
could not load a transcoding service
Has this been resolved? If so can you please provide a recipe?
-- DMJ1
The only thing that comes to mind is the environment variable. On my system
XERCESC_NLS_HOME="/usr/share/xerces-c/msg". This directory only contains the
file XercesMessages_en_US.cat
--
View this message in context: http://old.nabble.com/Could-not-load-a-transcoding-service---Linux-tp25468057p30637065.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.
DMJ1
2011-01-11 01:09:07 UTC
Permalink
Thanks for the reply. We got around it temporarily using LANG=en_US.UTF8.
This seems to be working. I also figured that the applications were built
for xcerces 3.1 but the target machine has xcerces 2.8. I am wondering
whether this has any bearing on the issue I am seeing.
Post by David S.
Post by DMJ1
Post by David S.
Post by Paul Leeming
Hi,
I am attempting to use Xerces on a Set Top Box development kit, running
Linux. I have tested the code on an Linux PC and it works fine.
However, when I try to run it on my target device the
XMLPlatformUtils::Initialize() it fails with "Could not load a
transcoding service".
The Xerces code is compiled with --enable-transcoder-gnuiconv, and I
have also tried -iconv and -icu but the code will not build as it seems
these are not available on my system.
Using a debugger, the problem seems to be when calling
XMLPlatformUtils::Initialize()
{
which calls
XMLPlatformUtils::makeTransService()
which then calls
tc = new IconvGNUTransService(fgMemoryManager);
This fails in the constructor, in the overloaded new operator of XMemory
I have also cross compiled one of the examples which came with Xerces,
and this fails in the same way.
Has anyone had a similar problem, or have any ideas?
Thanks in advance
Paul
GNU iconv needs files from /usr/lib/gconv in order to work with Xerces.
Is the directory present on your target system?
I am having similar problems. I have built my libxerces library and
provided it on the target system. The target system has the
/usr/lib/gconv and can successfully translate the when I pass the file
using iconv with right parameters. However, the code always spits out the
could not load a transcoding service
Has this been resolved? If so can you please provide a recipe?
-- DMJ1
The only thing that comes to mind is the environment variable. On my
system XERCESC_NLS_HOME="/usr/share/xerces-c/msg". This directory only
contains the file XercesMessages_en_US.cat
--
View this message in context: http://old.nabble.com/Could-not-load-a-transcoding-service---Linux-tp25468057p30639495.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.
Continue reading on narkive:
Loading...