Invoking iconv on a single large attempt is far more efficient than many small ones. You can see from this:
So, if you have some methods to concatenate the records into 1 single file before passing to iconv, it will go a lot faster. iconv will return the file position that has the error, so if you have some indexing performed that allows you to accurate map a file position to record number, that would likely work. If you are just doing validation and expect all records should pass normally, this may work for you.
But can you reprogram that part of the script in C? I guess with libiconv you can better control the process in case there are many alien bytes sneaked in.
I want to use iconv.h to convert some text to another charset.
The code is below:
#include <stdio.h>
#include <stdlib.h>
#include <iconv.h>
int main()
{
iconv_t cd;
char instr="汉字";
char *inbuf;
char *outbuf;
unsigned int insize=7;
... (4 Replies)
Hello All,
I have an XML file which has some errors in its tag definition according to an xsd. When i validate this xml file against an xsd, i wish to only take the errors in a file and not the complete xml. for eg.
Raman.xml has some errors induced in it.
RamanValidator.xsd holds the schema... (5 Replies)
Hi ,
I am using iconv command to convert a file in UTF-16 format to UTF-8 format. This command will work for few files but for some showing an error as bad input character.
But if i copy the contents of the file for which it is showing "bad input character" to a new file and perform the... (0 Replies)
Hi ,
I am using iconv command to convert a file in UTF-16 format to UTF-8 format. This command will work for few files but for some showing an error as bad input character.
But if i copy the contents of the file for which it is showing "bad input character" to a new file and perform the... (2 Replies)
I have about 20 xml files I want to use xmllint to pretty print:
xmllint --format file01.xml > pretty_file01.xml
xmllint --format file02.xml > pretty_file02.xml
etc
Is there a way I can just use "xmllint --format" on all the current xml files so I don't have to run this command 20 times?? :( (5 Replies)
Hi All,
Need help to parse the xml file in shell script using xmllint. Below is the sample xml file.
<CARS>
<AUDI>
<Speed="45"/>
<speed="55"/>
<speed="75"/>
<speed="95"/>
</AUDI>
<BMW>
<Speed="30"/>
<speed="75"/>
<speed="120"/>
<speed="135"/>
</BMW>... (6 Replies)
Have like 50 xml files in a folder. They all have a Node named <Number>.How to display the values of <Number> with the count and filename in the folder. I am using Mac . (7 Replies)
Hi,
I'm trying to get some values from an xmlfile and want be able to process them. I'm using xmllint(v20901 on debian jessie) and this program directly outputs all results concatenated right after each other. I did not find a solution in the man page to get a different format or some output... (2 Replies)
Hi
I have an XML file which contains html urls in that node values. When i use xmllint to parse that, i am getting error (because of the sympols in the url). i have used --html option but it throws other tag errors.
Please guide me.
sample file.xml
<abc>
<bcd>
<cde>
<a>sometext</a>... (2 Replies)
Discussion started by: ananan
2 Replies
LEARN ABOUT CENTOS
approx
APPROX(8) System Manager's Manual APPROX(8)NAME
approx - proxy server for Debian archive files
SYNOPSIS
approx [OPTION]...
DESCRIPTION
approx responds to HTTP requests made by apt-get(8). It maintains a cache of Debian archive files that have been previously downloaded, so
that it can respond with a local copy when possible. If a file not in the cache is requested, approx will download it from a remote Debian
repository and deliver the contents to the client, simultaneously caching it for future use.
Over time, the approx server cache will grow to contain multiple, unneeded versions of Debian packages. The approx-gc(8) program removes
these from the cache.
OPTIONS -c file, --config file
Specify an additional configuration file. May be used multiple times.
USAGE
approx is invoked by inetd(8).
EXAMPLES
Suppose that a client machine's /etc/apt/sources.list file contains the following lines:
deb http://apt:9999/debian testing main
deb http://apt:9999/security testing/updates main
deb-src http://apt:9999/debian unstable main
In this example, apt is the hostname of the approx server machine on the local network. Each distribution, such as "debian" or "security",
is mapped to a remote repository in the approx server's configuration file.
For example, the approx.conf file on the approx server might contain the lines
debian http://ftp.debian.org/debian
security http://security.debian.org
The mapping scheme is very simple. If the approx.conf file contains the line
repository http://remote-host/initial/path
then any request to the approx server of the form
http://approx-server/repository/rest/of/URL
is rewritten to
http://remote-host/initial/path/rest/of/URL
when there is a "cache miss", and that file is cached as
/var/cache/approx/repository/rest/of/URL
(Note that the repository name on the left-hand side is not included in the rewritten URL unless it is explicitly mentioned in the right-
hand side's initial path.)
FILES
/etc/approx/approx.conf
Configuration file for approx and related programs.
/var/cache/approx
Default cache directory for archive files.
SEE ALSO approx.conf(5), inetd(8), approx-import(8), approx-gc(8), apt-get(8), sources.list(5)AUTHOR
Eric Cooper <ecc@cmu.edu>
May 2011 APPROX(8)