Sponsored Content
Full Discussion: iconv and xmllint
Top Forums UNIX for Advanced & Expert Users iconv and xmllint Post 302139424 by cbkihong on Saturday 6th of October 2007 12:53:05 PM
Old 10-06-2007
Yes, that's why it is good if you are doing validation and normally would expect everything to pass.

This shortcut will be quite messy otherwise, if indeed some records have problems. That's why I have another suggestion of using libiconv, as I know you can instruct it to ignore bytes that cannot be converted and proceed, and do so without stopping the iconv process. This cannot be achieved with the iconv executable alone because there are no "hooks" that allow you do so from the command line.

Loading of character tables is very expensive operation, so starting iconv many times is bound to be slow. If you really have records of that volume, you should really invest in a C program with libiconv that acts on a concatenated sequence of records. I have some good feeling that it could work based on my earlier exploration of libiconv although I have not made anything similar myself.
 

10 More Discussions You Might Find Interesting

1. Programming

about iconv

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)
Discussion started by: yong
4 Replies

2. Shell Programming and Scripting

xmllint output to a file

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)
Discussion started by: damansingh
5 Replies

3. Shell Programming and Scripting

XMLLINT COMMAND IN UNIX TO VALIDATE XML AGAINST XSD

Hi i am baby to unix shell script. how do i validate xml agaist xsd and transforms xml using xslt. Thanks Mohan (2 Replies)
Discussion started by: mohan.cheepu
2 Replies

4. Shell Programming and Scripting

Help with iconv command

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)
Discussion started by: Shruthi8818
0 Replies

5. UNIX for Dummies Questions & Answers

Help with iconv command

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)
Discussion started by: Shruthi8818
2 Replies

6. UNIX for Dummies Questions & Answers

Xmllint pretty print, batch files

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)
Discussion started by: pxalpine
5 Replies

7. Shell Programming and Scripting

Parse XML using xmllint

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)
Discussion started by: prasanna2166
6 Replies

8. Shell Programming and Scripting

Help with xmllint

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)
Discussion started by: Anethar
7 Replies

9. Shell Programming and Scripting

Xmllint: get one result per line

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)
Discussion started by: stomp
2 Replies

10. Shell Programming and Scripting

Xmllint parser error : EntityRef: expecting ';'

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
BTARCMP(1)						      General Commands Manual							BTARCMP(1)

NAME
btarcmp - a diff for Barry tar backup files SYNOPSIS
btarcmp [-b][-d db][-D db][-h][-I charset][-P][-S][-v] tar0 tar1 DESCRIPTION
btarcmp takes two Barry backup tar files on the command line, and displays the differences it finds between them. If records can be parsed, individual field differences are also displayed. Added and removed records are noted. Differences in database availability are noted as well. If unable to parse the records, hex dumps are used. OPTIONS
-b Use brief filename markers. Useful when tar filenames are extremely long. -d db Name of database to compare. Can be used multiple times to compare multiple databases. If not specified, all databases are com- pared. -D db Name of database to skip. Can be used multiple times. Overrides all other database selection options. -h Show summary of options. -I charset Specifies the iconv charset to use for converting international strings. The Blackberry uses the WINDOWS-1252 charset, which is incompatible with the more common code pages used in Linux. The most useful charset to use with this option is UTF-8, and is highly recommended. Any other charset available via 'iconv --list' can be used here too, but may not be successful for some character con- versions. -S Displays list of known database records, which can be parsed. -v Verbose output, which includes record data of added and deleted records in the output. If used twice, hex data is printed as well. AUTHOR
btarcmp is part of the Barry project. SEE ALSO
http://www.netdirect.ca/barry January 20, 2010 BTARCMP(1)
All times are GMT -4. The time now is 05:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy