Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Determing the encoding of a file Post 302751841 by MIA651 on Friday 4th of January 2013 03:10:27 PM
Old 01-04-2013
Sorry DGPickett, tried that and it looked all Greek to me(not in a literal sense, lol)
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

File encoding in Unix

1. I have a shell script which creates a file using cat command. How can i find what encoding the file follows (e.g. UTF8, ANSI)? 2. I want to convert that file to PC-ANSI format. How can i achieve that? I am using HP-Unix. (6 Replies)
Discussion started by: ssmallya
6 Replies

2. Shell Programming and Scripting

get the file encoding

Hello! The system is AIX 5.3 Give please command or script to get the file encoding Thanks (2 Replies)
Discussion started by: vinment
2 Replies

3. AIX

get the file encoding

Hello! The system is AIX 5.3 Give please command or script to get the file encoding (1 Reply)
Discussion started by: vinment
1 Replies

4. Shell Programming and Scripting

Dymically determing the number of check list in Zenity, How?

hi, In my project i cannot determine the number of check list initially... I will know dynamically during execution... so How to specify the number of check list dynamically in zenity Waiting for your precious Answer..... (1 Reply)
Discussion started by: shivarajM
1 Replies

5. Shell Programming and Scripting

Cygwin vi XML file encoding problem

Hi, I have got a zip (binary) file transferred from MacOS (thus it has additional __MACOSX directory packed inside). On extracting this zip, there are few *.xml files available. When I opened this *.xml file in vim editor using Cygwin (on windows) the editor displayed in the bottom. I tried... (4 Replies)
Discussion started by: royalibrahim
4 Replies

6. HP-UX

how to find the character encoding of a file in hp_ux

how to find the character encoding of a file in hp_ux (1 Reply)
Discussion started by: alokjyotibal
1 Replies

7. Shell Programming and Scripting

How to find the file encoding and updating the file encoding?

Hi, I am beginner to Unix. My requirement is to validate the encoding used in the incoming file(csv,txt).If it is encoded with UTF-8 format,then the file should remain as such otherwise i need to chnage the encoding to UTF-8. Please advice me how to proceed on this. (7 Replies)
Discussion started by: cnraja
7 Replies

8. HP-UX

Determing size of swap space

Hi Experts, Need your advise in determining the size of swap space in of the new HP-Ux server. Server is having 32G of physical memory. Ideally what amout of physical memory should be allocated as a swap space? Following document from HP suggests to have minimum swap space... (2 Replies)
Discussion started by: sai_2507
2 Replies

9. Solaris

View file encoding then change encoding.

Hi all!! I´m using command file -i myfile.xml to validate XML file encoding, but it is just saying regular file . I´m expecting / looking an output as UTF8 or ANSI / ASCII Is there command to display the files encoding? Thank you! (2 Replies)
Discussion started by: mrreds
2 Replies

10. Shell Programming and Scripting

How to know file encoding?

how can i know what format a file is * example: UTF-8 ANSI UCS2 i am in a... (8 Replies)
Discussion started by: tricampeon81
8 Replies
DumpXML(3pm)						User Contributed Perl Documentation					      DumpXML(3pm)

NAME
Data::DumpXML - Dump arbitrary data structures as XML SYNOPSIS
use Data::DumpXML qw(dump_xml); $xml = dump_xml(@list) DESCRIPTION
This module provides a single function called dump_xml() that takes a list of Perl values as its argument and produces a string as its result. The string returned is an XML document that represents any Perl data structures passed to the function. Reference loops are han- dled correctly. The following data model is used: data : scalar* scalar = undef | str | ref | alias ref : scalar | array | hash | glob | code array: scalar* hash: (key scalar)* The distribution comes with an XML schema and a DTD that more formally describe this structure. As an example of the XML documents produced, the following call: $a = bless [1,2], "Foo"; dump_xml($a); produces: <?xml version="1.0" encoding="US-ASCII"?> <data xmlns="http://www.cpan.org/.../Data-DumpXML.xsd"> <ref> <array class="Foo"> <str>1</str> <str>2</str> </array> </ref> </data> If dump_xml() is called in a void context, then the dump is printed on STDERR automatically. For compatibility with "Data::Dump", there is also an alias for dump_xml() called simply dump(). "Data::DumpXML::Parser" is a class that can restore data structures dumped by dump_xml(). Configuration variables The generated XML is influenced by a set of configuration variables. If you modify them, then it is a good idea to localize the effect. For example: sub my_dump_xml { local $Data::DumpXML::INDENT = ""; local $Data::DumpXML::XML_DECL = 0; local $Data::DumpXML::DTD_LOCATION = ""; local $Data::DumpXML::NS_PREFIX = "dumpxml"; return dump_xml(@_); } The variables are: $Data::DumpXML::INDENT You can set the variable $Data::DumpXML::INDENT to control the amount of indenting. The variable contains the whitespace you want to be used for each level of indenting. The default is a single space. To suppress indenting, set it to "". $Data::DumpXML::INDENT_STYLE This variable controls where end element are placed. If you set this variable to the value "Lisp" then end tags are not prefixed by NL. This give a more compact output. $Data::DumpXML::XML_DECL This boolean variable controls whether an XML declaration should be prefixed to the output. The XML declaration is the <?xml ...?> thingy. The default is 1. Set this value to 0 to suppress the declaration. $Data::DumpXML::NAMESPACE This variable contains the namespace used for the XML elements. The default is to let this be a URI that actually resolve to the XML schema on CPAN. Set it to "" to disable use of namespaces. $Data::DumpXML::NS_PREFIX This variable contains the namespace prefix to use on the elements. The default is "", which means that a default namespace will be declared. $Data::DumpXML::SCHEMA_LOCATION This variable contains the location of the XML schema. If this variable is non-empty, then an "xsi:schemaLocation" attribute is added to the top level "data" element. The default is not to include this, as the location can be inferred from the default XML namespace used. $Data::DumpXML::DTD_LOCATION This variable contains the location of the DTD. If this variable is non-empty, then a <!DOCTYPE ...> is included in the output. The default is to point to the DTD on CPAN. Set it to "" to suppress the <!DOCTYPE ...> line. BUGS
Class names with 8-bit characters are dumped as Latin-1, but converted to UTF-8 when restored by the Data::DumpXML::Parser. The content of globs and subroutines are not dumped. They are restored as the strings "** glob **" and "** code **". LVALUE and IO objects are not dumped at all. They simply disappear from the restored data structure. SEE ALSO
Data::DumpXML::Parser, XML::Parser, XML::Dumper, Data::Dump AUTHORS
The "Data::DumpXML" module is written by Gisle Aas <gisle@aas.no>, based on "Data::Dump". The "Data::Dump" module was written by Gisle Aas, based on "Data::Dumper" by Gurusamy Sarathy <gsar@umich.edu>. Copyright 1998-2003 Gisle Aas. Copyright 1996-1998 Gurusamy Sarathy. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.8.8 2006-04-08 DumpXML(3pm)
All times are GMT -4. The time now is 10:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy