02-24-2010
Encoding Type
Hi,
Where can I find the encoding type in a unix server ?
Thanks in advance !!!
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Can one string type variable changed into the date type variable. (1 Reply)
Discussion started by: rinku
1 Replies
2. Programming
Dear colleagues,
One of my friend have a problem with c code. While compiling a c program it displays a message like
"array type has incomplete element type". Any body can provide a solution for it.
Jaganadh.G (1 Reply)
Discussion started by: jaganadh
1 Replies
3. UNIX for Dummies Questions & Answers
Hi, I'm using putty and when I try to write ü it writes | (or when I try to write é , it writes i)
I tried to change settings/translation of putty but with no success
I have KSH
# locale
LANG=
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"... (3 Replies)
Discussion started by: palmer18
3 Replies
4. AIX
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
5. Shell Programming and Scripting
hi folks ,
I have a shell script which contain SQL query that dump some data from the DB in arabic and this data is written to a file in unix machine but the problem that the arabic data is appear like ??????????|111|???????? even when I move it to my windows XP machine.
Any one have an Idea... (2 Replies)
Discussion started by: habuzahra
2 Replies
6. Shell Programming and Scripting
Hi experts,
I have a gz file from other system(solaris), which is ftped to our system(solaris).
After gunzip, the file is a xml file and we are using ORACLE built in xml transformiing tool ORAXSL to transform XML to TXT.
Now the issue is we come accross issue regarding UTF8 as below:... (1 Reply)
Discussion started by: summer_cherry
1 Replies
7. Shell Programming and Scripting
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. Solaris
Hi All,
Hope you can help me with the below :).
I'm working on a script on SUN solaris and I'm facing a problem with the number encoding as shown below,
1 is encoded to 31 (this is ASCII so it's ok)
11 is encoded as B118 !!! don't know why
111 is encoded as B1580C !!! don't know why ... (4 Replies)
Discussion started by: /dev/bag
4 Replies
9. Solaris
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
LEARN ABOUT DEBIAN
http::response::encoding
HTTP::Response::Encoding(3pm) User Contributed Perl Documentation HTTP::Response::Encoding(3pm)
NAME
HTTP::Response::Encoding - Adds encoding() to HTTP::Response
VERSION
$Id: Encoding.pm,v 0.5 2007/05/12 09:24:15 dankogai Exp $
SYNOPSIS
use LWP::UserAgent;
use HTTP::Response::Encoding;
my $ua = LWP::UserAgent->new();
my $res = $ua->get("http://www.example.com/");
warn $res->encoding;
EXPORT
Nothing.
METHODS
This module adds the following methods to HTTP::Response objects.
"$res->charset"
Tells the charset exactly as appears in the "Content-Type:" header. Note that the presence of the charset does not guarantee if the
response content is decodable via Encode.
To normalize this, you should try
$res->encoder->mime_name; # with Encode 2.21 or above
or
use I18N::Charset;
# ...
mime_charset_name($res->encoding);
"$res->encoder"
Returns the corresponding encoder object or undef if it can't.
"$res->encoding"
Tells the content encoding in the canonical name in Encode. Returns undef if it can't.
For most cases, you are more likely to successfully find encoding after GET than HEAD. HTTP::Response is smart enough to parse
<meta http-equiv="Content-Type" content="text/html; charset=whatever"/>
But you need the content to let HTTP::Response parse it. If you don't want to retrieve the whole content but interested in its encoding,
try something like below;
my $req = HTTP::Request->new(GET => $uri);
$req->headers->header(Range => "bytes=0-4095"); # just 1st 4k
my $res = $ua->request($req);
warn $res->encoding;
"$res->decoded_content"
Discontinued since HTTP::Message already has this method.
See HTTP::Message for details.
INSTALLATION
To install this module, run the following commands:
perl Makefile.PL
make
make test
make install
AUTHOR
Dan Kogai, "<dankogai at dan.co.jp>"
BUGS
Please report any bugs or feature requests to "bug-http-response-encoding at rt.cpan.org", or through the web interface at
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTTP-Response-Encoding>. I will be notified, and then you'll automatically be notified of
progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc HTTP::Response::Encoding
You can also look for information at:
o AnnoCPAN: Annotated CPAN documentation
<http://annocpan.org/dist/HTTP-Response-Encoding>
o CPAN Ratings
<http://cpanratings.perl.org/d/HTTP-Response-Encoding>
o RT: CPAN's request tracker
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTTP-Response-Encoding>
o Search CPAN
<http://search.cpan.org/dist/HTTP-Response-Encoding>
ACKNOWLEDGEMENTS
GAAS for LWP.
MIYAGAWA for suggestions.
COPYRIGHT & LICENSE
Copyright 2007 Dan Kogai, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.0 2009-07-12 HTTP::Response::Encoding(3pm)