Could someone please tell me how to convert double byte charaters to single byte characters in HP-UX 11.11 without installing any applications?
e.g. I have a double byte string below and I want to convert it to a single byte string ABCdef123
ABCdef123
I tried using the iconv command but I just get a message "iconv: can not initialize the conversion".
I am writing the script to encrypt and decrypt content of the text file.
How can I convert ASCII to characters and backward? I need it for Bourne shell script.
Thanks::confused: (3 Replies)
How do I replace a space " " character at a particular position in a line?
e.g. I have a file below
$ cat i2
111 002 A a
33 0011 B c
2222 003 C a
I want all the 1st spaces to be replaced with forward slash "/" and the 3rd spaces to have 5 spaces to get the output below:
111/002... (8 Replies)
Hi
I am having file like this
1 560017039 575052020 22-11-2003 8,290.00 709545 100239050 11
2 560017006 575052020 13-01-2008 20,000.00 709545 100246770 11
i want to convert it like
5600170395750520202211200300000008290000000000000709545010023905011... (8 Replies)
Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/
Thanks! (1 Reply)
When I write
Select date_field from TableA fetch first row only
I am getting the output as 09/25/2009.
I want to get the output in the below format
2009-09-25 i.e., MM-DD-YYYY. Please help (7 Replies)
I am trying to read values from excel and perform some calculations but I am getting below error:
expr 2.326227180240883E7 / 8.509366417956961E8
expr: non-numeric argument
Can anyone let me know how do i convert thse exponential numbers to decimal. (2 Replies)
Need assistance
Below script get the output correctly
I want to convert the date format .Below is the output . Any idea ?
#!/usr/bin/perl -w
use DBI;
# Get a database handle by connecting to the database
my $db = DBI->connect(... (3 Replies)
Hi,
Anyone can help using SED searches a character string for a specified delimiter character, and returns a leading or trailing space/blank.
Text file :
"1"|"ExternalClassDEA519CF5"|"Art1"
"2"|"ExternalClass563EA516C"|"Art3"
"3"|"ExternalClass305ED16B8"|"Art9"
...
...
... (2 Replies)
Discussion started by: fspalero
2 Replies
LEARN ABOUT FREEBSD
kiconv_add_xlat16_table
KICONV(3) BSD Library Functions Manual KICONV(3)NAME
kiconv_add_xlat16_cspair, kiconv_add_xlat16_cspairs, kiconv_add_xlat16_table -- kernel side iconv library
LIBRARY
Kernel side iconv library (libkiconv, -lkiconv)
SYNOPSIS
#include <sys/iconv.h>
int
kiconv_add_xlat16_cspair(const char *tocode, const char *fromcode, int flag);
int
kiconv_add_xlat16_cspairs(const char *foreigncode, const char *localcode);
int
kiconv_add_xlat16_table(const char *tocode, const char *fromcode, const void *data, int datalen);
DESCRIPTION
The kiconv library provides multi-byte character conversion tables for kernel side iconv service.
The kiconv_add_xlat16_cspair() function defines a conversion table using iconv(3) between fromcode charset and tocode charset. You can spec-
ify flag to determine if tolower(3) / toupper(3) conversion is included in the table. The flag has following values.
KICONV_LOWER
KICONV_FROM_LOWER It generates a tolower table in addition to a character conversion table. The difference between two is tolower tocode or
tolower fromcode.
KICONV_UPPER
KICONV_FROM_UPPER It generates a toupper table in addition to a character conversion table. The difference between two is toupper tocode or
toupper fromcode.
A tolower/toupper conversion is limited to single-byte characters.
The kiconv_add_xlat16_cspairs() function defines two conversion tables which are from localcode to foreigncode and from foreigncode to
localcode. These conversion tables also contain both tolower and toupper tables.
The kiconv_add_xlat16_table() function defines a conversion table directly pointed by data whose length is datalen, not using iconv(3).
SEE ALSO iconv(3), tolower(3), toupper(3)BSD July 17, 2003 BSD