9 More Discussions You Might Find Interesting
1. Red Hat
Hi all,
am running the following code on a RHEL 6.6 box to list which charsets are loaded and which are available:
#!/usr/bin/perl -w
use strict;
use Encode;
my @list = Encode->encodings();
my @all_encodings = Encode->encodings(":all");
print "@list\n\n";
print "@all_encodings\n";
... (3 Replies)
Discussion started by: Fundix
3 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
I'm facing an issue when i ssh to a router and exporting the output to a txt file.
ssh johndoe@10.0.0.1 -a | tee file.txt
Closing the connection and opening the .txt file. There are strange 'domino's' appearing here and there. See the screenshot below.
... (2 Replies)
Discussion started by: Antonio Fargas
2 Replies
3. Shell Programming and Scripting
Dear All,
Can someone help to command or program to transfer the file from windows to Unix server and from one unix server to another Unix server in secure way.
I would request no samba client. (4 Replies)
Discussion started by: yadavricky
4 Replies
4. UNIX for Advanced & Expert Users
Hello Experts, please help to provide any insight as I am facing issue migrating java application from hpux to redhat. The java program is using InputStreamReader to read a file without specifying any charset parameter.
However, in new Linux Redhat 5.6 environent, when reading a file that... (1 Reply)
Discussion started by: sonic_air
1 Replies
5. UNIX for Dummies Questions & Answers
what's the relationship among locale, glibc, charset, charmap and fonts?
why locale needs to be generated by glibc? how?
what are in the locale-archive file?
and what are in font files? (0 Replies)
Discussion started by: vistastar
0 Replies
6. Shell Programming and Scripting
Hi All
I'm using a tree command in a script that for me outputs:-
| - - DIRECTORYNAME
However a different user is getting the following output:-
aaa (actually with an umlat above them) DIRECTORYNAME
I'm not sure where this could be coming from, any ideas anyone? (0 Replies)
Discussion started by: Bashingaway
0 Replies
7. UNIX for Dummies Questions & Answers
How does unix system administration, unix programming, unix network programming differ?
Please help. (0 Replies)
Discussion started by: thulasidharan2k
0 Replies
8. Shell Programming and Scripting
Hi all,
My objective is to find out the charset using which a file is encoded. (The OS is SunOs)
I have set NLS_LANG to AR8MSWIN1256 and spooled the file.
When viewed the file using vi, I saw the following
\307\341\321\355\307\326
I then inserted the line containing these codes in a... (3 Replies)
Discussion started by: sridhar_423
3 Replies
9. SuSE
Hi,
I am a newbie to Linux(Suse).I am facing a problem with 'sqlldr' utility while trying to upload data to Database tables.My backend is Oracle and is using the UTF8 encoding format.I am trying to load a datafile which contains some Western European Characters.While loading am getting an... (0 Replies)
Discussion started by: DILEEP410
0 Replies
Ns_ConnType(3aolserver) AOLserver Library Procedures Ns_ConnType(3aolserver)
__________________________________________________________________________________________________________________________________________________
NAME
Ns_ConnGetType, Ns_ConnSetType - Routines to manage the HTTP response type
SYNOPSIS
#include "ns.h"
char *
Ns_ConnGetType(conn)
void
Ns_ConnSetType(conn, type)
ARGUMENTS
Ns_Conn conn (in) Pointer to open connection.
char *type (in) Character string with response mimetype.
_________________________________________________________________
DESCRIPTION
These routines both manage the eventual content-type header which is generated by a later call to Ns_ConnFlush or Ns_ConnFlushDirect as
well as manage the appropriate character encoding for text output types.
char *Ns_ConnGetType(conn)
Return the current HTTP mime type (e.g., "text/html; charset=iso-8859-1") or NULL if no type has yet been set.
void Ns_ConnSetType(conn, type)
Sets the mimetype of the response to the given type. A later call to Ns_ConnFlush will include a header of the form content-type:
type when generating the response.
CHARSETS AND ENCODINGS
For text types, a call to Ns_ConnSetType can also include an optional "charset=" attribute. If no charset is specified, the server will
append a default charset if specified as the outputcharset server configuration variable.
With a given or automatically appended charset for text types, the server will then set the output encoding to the cooresponding Tcl_Encod-
ing, for example, mapping the charset "iso-8859-1" to the Tcl_Encoding equivalent "iso8859-1". All text later sent via Ns_ConnFlush will
be first encoded using the determined Tcl_Encoding (calls to Ns_ConnFlushDirect will bypass this encoding step). See the man pages on
Ns_GetCharsetEncoding for details on how these mappings are configured.
The charset modification feature was added in later versions of AOLserver to support legacy code which may have been sprinkled with direct
calls to set text types without specifying the charset, e.g., calls such as:
ns_return 200 text/html "<body>hello</body>"
EXAMPLES
The following example demonstrates sending Japanese character data. In this case, assume "utf8string" contains a series of UTF-8 bytes
with various Japanese characters. The call to Ns_ConnSetType will setup the appropriate "shiftjis" output Tcl_Encoding to match the given
"shift_jis" charset:
Ns_ConnSetStatus(conn, 200);
Ns_ConnSetType(conn, "text/html; charset=shift_jis");
Ns_ConnFlushDirect(conn, utf8string, -1, 0);
The following demonstrates the behavior of the default server charset encoding. Assume the following is set in the config file:
ns_section ns/server/serverName
ns_param outputcharset iso-8859-1
In this case, a call to Ns_ConnSetType(conn, "text/html") without a specific charset would be modified to include "charset=iso-8859-1".
Based on this modification, the output encoding would be set to the "iso8859-1" Tcl_Encoding.
SEE ALSO
Ns_ConnGetType(3), Ns_ConnSetType(3), Ns_ConnFlush(3), Ns_ConnFlushDirect(3), Ns_ConnSetRequiredHeaders(3), Ns_ConnQueueHeaders(3),
Ns_GetCharsetEncoding(3), Ns_GetTypeEncoding(3), ns_conn(n)
KEYWORDS
connectionn, response, status, encoding, charset
AOLserver 4.0 Ns_ConnType(3aolserver)