Sponsored Content
Full Discussion: Encoding problem
Operating Systems Solaris Encoding problem Post 302527738 by /dev/bag on Sunday 5th of June 2011 02:35:42 AM
Old 06-05-2011
Encoding problem

Hi All,

Hope you can help me with the below Smilie.

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
22 is encoded as 3219

The chars are encoded to normal ASCII format. Does any one know what kind of encoding is this?

Thank you all,
Ammar
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

encoding

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

2. UNIX for Dummies Questions & Answers

Encoding Problem while using "|" (PIPE) as delimiter from Mainframe to Unix

We are facing a problem with PIPE (|) as a delimiter in one of our FTP flat files. We are constructing a Flat file in IBM-AIX and this contains various strings delimted by PIPE Symbol and then FTPing this to a Mainframe System The Mainframe program simply recieves this and FTPs the same... (1 Reply)
Discussion started by: seshendra
1 Replies

3. Shell Programming and Scripting

URL encoding

Hi All, I want to do URL encoding using shell script in my project. I decided that the sed is the correct tool to do this. But I am unable achieve what I wanted using sed. kindly help me to get rid of this. My requirement is , there will be one URL with all special character, spaces etc... ... (8 Replies)
Discussion started by: Vichu
8 Replies

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

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

6. Shell Programming and Scripting

Encoding troubles

Hello All I have a set of files, each one containing some lines that follows that regex: regex='disabled\,.*\,\".*\"'and here is what file says about each files: file <random file> <random file> ASCII text, with CRLF line terminatorsSo, as an example, here is what a file ("Daffy Duck - The... (3 Replies)
Discussion started by: tukuyomi
3 Replies

7. UNIX for Dummies Questions & Answers

Encoding Type

Hi, Where can I find the encoding type in a unix server ? Thanks in advance !!! (1 Reply)
Discussion started by: risshanth
1 Replies

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

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

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
UUENCODE(5)						      BSD File Formats Manual						       UUENCODE(5)

NAME
uuencode -- format of an encoded uuencode file DESCRIPTION
Files output by uuencode(1) consist of a header line, followed by a number of body lines, and a trailer line. The uudecode(1) command will ignore any lines preceding the header or following the trailer. Lines preceding a header must not, of course, look like a header. The header line starts with the word ``begin'', a space, a file mode (in octal), a space, and finally a string which names the file being encoded. The central engine of uuencode(1) is a six-bit encoding function which outputs an ASCII character. The six bits to be encoded are treated as a small integer and added with the ASCII value for the space character (octal 40). The result is a printable ASCII character. In the case where all six bits to be encoded are zero, the ASCII backquote character ` (octal 140) is emitted instead of what would normally be a space. The body of an encoded file consists of one or more lines, each of which may be a maximum of 86 characters long (including the trailing new- line). Each line represents an encoded chunk of data from the input file and begins with a byte count, followed by encoded bytes, followed by a newline. The byte count is a six-bit integer encoded with the above function, representing the number of bytes encoded in the rest of the line. The method used to encode the data expands its size by 133% (described below). Therefore it is important to note that the byte count describes the size of the chunk of data before it is encoded, not afterwards. The six bit size of this number effectively limits the number of bytes that can be encoded in each line to a maximum of 63. While uuencode(1) will not encode more than 45 bytes per line, uudecode(1) will toler- ate the maximum line size. The remaining characters in the line represent the data of the input file encoded as follows. Input data are broken into groups of three eight-bit bytes, which are then interpreted together as a 24-bit block. The first bit of the block is the highest order bit of the first character, and the last is the lowest order bit of the third character. This block is then broken into four six-bit integers which are encoded one by one starting from the first bit of the block. The result is a four character ASCII string for every three bytes of input data. Encoded lines of data continue in this manner until the input file is exhausted. The end of the body is signaled by an encoded line with a byte count of zero (the ASCII backquote character `). Obviously, not every input file will be a multiple of three bytes in size. In these cases, uuencode(1) will pad the remaining one or two bytes of data with garbage bytes until a three byte group is created. The byte count in a line containing garbage padding will reflect the actual number of bytes encoded, making it possible to convey how many bytes are garbage. The trailer line consists of ``end'' on a line by itself. SEE ALSO
mail(1), uucp(1), uudecode(1), uuencode(1), ascii(7) HISTORY
The uuencode file format appeared in 4.0BSD. BUGS
The interpretation of the uuencode format relies on properties of the ASCII character set and may not work correctly on non-ASCII systems. BSD
April 9, 1997 BSD
All times are GMT -4. The time now is 01:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy