Sponsored Content
Full Discussion: UTF8 encoding
Top Forums Shell Programming and Scripting UTF8 encoding Post 302424112 by fpmurphy on Monday 24th of May 2010 08:36:54 AM
Old 05-24-2010
First of all, does your XML contain an encoding declaration as the first line? Something like:
Code:
<?xml version="1.0" encoding="UTF-8"?>

If not, please let us what the encoding declaration is.

Next of all, not all valid UTF8 characters are valid XML characters. See Section 2.2 of Extensible Markup Language (XML) 1.0 (Second Edition) This applies to CDATA also. If this is the case, all you can do is write a filter to scrub the offending characters.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Utf8-utf16

Hi All, When we create a flat file using a PLSQL program , the flat file is being created in UTF8 format.This file has lot of german characters.When we use this file to load data into MS SQL Server, the german characters are coming as junk. When we create a flat file in oracle it is being ... (1 Reply)
Discussion started by: Suppandi
1 Replies

2. Shell Programming and Scripting

utf8 strings in Perl

Hi All I need help on how to handle utf8 strings (match, split etc.) in Perl. Thanks in advance. (2 Replies)
Discussion started by: my_Perl
2 Replies

3. Linux

xterm font size and utf8

Hi everyone! I want to change the default font size of xterm. I tried appending the following line in .Xresources xterm -fn -*-fixed-medium-*-*-*-14-*-*-*-*-*-*-* The size changes, but when I try to write in greek, nothing is printed on the screen. I tried appending a similar line to... (0 Replies)
Discussion started by: kerb41
0 Replies

4. 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

5. Shell Programming and Scripting

Convert to UTF8 File - Unix

All, I have several *.dat files which is created in windows (ANSI Endoing) Or PC File format, once I copy those files to unix. How can I convert those file to utf8 encoding ? I tired iconv, it says not supported Please help Thanks - S (5 Replies)
Discussion started by: Shanks
5 Replies

6. Debian

Locales UTF8 - not working

Hello, I'm facing a strange problem in one of my Debian server, what is happening right now it that I have runned dpkg-reconfigure locales to set en_US UTF-8 so in that way I could use accentuation in my system. # locale -a C en_US.utf8 POSIX pt_BR.utf8 However, when I create a new... (12 Replies)
Discussion started by: pxb368@motorola
12 Replies

7. UNIX for Advanced & Expert Users

Problem With UTF8 Byte Order Make

Hi Im migrating a few websites from my old webserver (CentOS-5) to a new server (CentOS6) , one of these websites is multilingual and has a lot of utf8 files(html,php) with different languages (i.e arabic, persian, russian ,etc). In old server when i do: file mailer.php I get : ... (6 Replies)
Discussion started by: mohs3n
6 Replies

8. Linux

How to create new empty utf8 file for appending?

Hey i try to create empty text file with utf-8 encoding without success what is the right way to do this ? tried with touch test.txt iconv -f UTF-8 -t UTF-8 test.txt or iconv -f latin1 -t UTF-8 test.txt (8 Replies)
Discussion started by: umen
8 Replies

9. Shell Programming and Scripting

Latin character to UTF8

Hi., Can any one please share information on how to convert latin character to utf 8 using shell script or what ever perl or python ? Thanks. (1 Reply)
Discussion started by: alnhk
1 Replies

10. 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
Frontier::Client(3)					User Contributed Perl Documentation				       Frontier::Client(3)

NAME
Frontier::Client - issue Frontier XML RPC requests to a server SYNOPSIS
use Frontier::Client; $server = Frontier::Client->new( I<OPTIONS> ); $result = $server->call($method, @args); $boolean = $server->boolean($value); $date_time = $server->date_time($value); $base64 = $server->base64($value); $value = $boolean->value; $value = $date_time->value; $value = $base64->value; DESCRIPTION
Frontier::Client is an XML-RPC client over HTTP. Frontier::Client instances are used to make calls to XML-RPC servers and as shortcuts for creating XML-RPC special data types. METHODS
new( OPTIONS ) Returns a new instance of Frontier::Client and associates it with an XML-RPC server at a URL. OPTIONS may be a list of key, value pairs or a hash containing the following parameters: url The URL of the server. This parameter is required. For example: $server = Frontier::Client->new( 'url' => 'http://betty.userland.com/RPC2' ); proxy A URL of a proxy to forward XML-RPC calls through. encoding The XML encoding to be specified in the XML declaration of outgoing RPC requests. Incoming results may have a different encoding specified; XML::Parser will convert incoming data to UTF-8. The default outgoing encoding is none, which uses XML 1.0's default of UTF-8. For example: $server = Frontier::Client->new( 'url' => 'http://betty.userland.com/RPC2', 'encoding' => 'ISO-8859-1' ); use_objects If set to a non-zero value will convert incoming <i4>, <float>, and <string> values to objects instead of scalars. See int(), float(), and string() below for more details. debug If set to a non-zero value will print the encoded XML request and the XML response received. call($method, @args) Forward a procedure call to the server, either returning the value returned by the procedure or failing with exception. `$method' is the name of the server method, and `@args' is a list of arguments to pass. Arguments may be Perl hashes, arrays, scalar values, or the XML-RPC special data types below. boolean( $value ) date_time( $value ) base64( $base64 ) The methods `"boolean()"', `"date_time()"', and `"base64()"' create and return XML-RPC-specific datatypes that can be passed to `"call()"'. Results from servers may also contain these datatypes. The corresponding package names (for use with `"ref()"', for exam- ple) are `"Frontier::RPC2::Boolean"', `"Frontier::RPC2::DateTime::ISO8601"', and `"Frontier::RPC2::Base64"'. The value of boolean, date/time, and base64 data can be set or returned using the `"value()"' method. For example: # To set a value: $a_boolean->value(1); # To retrieve a value $base64 = $base64_xml_rpc_data->value(); Note: `"base64()"' does not encode or decode base64 data for you, you must use MIME::Base64 or similar module for that. int( 42 ); float( 3.14159 ); string( "Foo" ); By default, you may pass ordinary Perl values (scalars) to be encoded. RPC2 automatically converts them to XML-RPC types if they look like an integer, float, or as a string. This assumption causes problems when you want to pass a string that looks like "0096", RPC2 will convert that to an <i4> because it looks like an integer. With these methods, you could now create a string object like this: $part_num = $server->string("0096"); and be confident that it will be passed as an XML-RPC string. You can change and retrieve values from objects using value() as described above. SEE ALSO
perl(1), Frontier::RPC2(3) <http://www.scripting.com/frontier5/xml/code/rpc.html> AUTHOR
Ken MacLeod <ken@bitsko.slc.ut.us> perl v5.8.0 2003-01-27 Frontier::Client(3)
All times are GMT -4. The time now is 06:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy