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
iconv.h
iconv.h(3HEAD) Headers iconv.h(3HEAD)NAME
iconv.h, iconv - codeset conversion facility
SYNOPSIS
#include <iconv.h>
DESCRIPTION
The <iconv.h> header defines the following type:
iconv_t Identifies the conversion from one codeset to another.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO iconv(3C), iconv_close(3C), iconv_open(3C), attributes(5), standards(5)SunOS 5.10 10 Sep 2004 iconv.h(3HEAD)