09-06-2011
sounds like a character encoding mismatch. are you seeing this error from within Apples terminal ? try with a non apple terminal window. then check the encoding in the preferences . There is an emulation feature and character encoding setting in the terminal preferences.
hope this helps
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi there,
I have a strange problem and I cannot figure it out what I am doing wrong here.
Let me try to picture it.
In principle it is prety straight forward, but something odd is happening.
Here is part of the input file snmp_alm.cfg:
... (2 Replies)
Discussion started by: ejdv
2 Replies
2. UNIX for Dummies Questions & Answers
Hi!!..
I would like to know what is maximum character size for a command in the "sh" or "bourne" shell?
Thanks in advance..
Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies
3. UNIX for Advanced & Expert Users
Hi!!..
I would like to know what is maximum character size for a command in the "sh" or "bourne" shell?
Thanks in advance..
Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies
4. Shell Programming and Scripting
Hi!!..
I would like to know what is maximum character size for a command in the "sh" or "bourne" shell?
Thanks in advance..
Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies
5. UNIX for Advanced & Expert Users
I'm running Mac OS, using the latest version of zsh.
I've noticed that I have funny tab-completion behavior when inside a screen session.
Specifically, once I press tab, the first part of my command seems to be duplicated before the completion results are inserted.
For example, if I type... (14 Replies)
Discussion started by: marshaul
14 Replies
6. Shell Programming and Scripting
If I enter (simplified):
find . -printf "%p\n"
then all files in the output are prepended by a "." like
./local/share/test23.log
How can achieve that
a.) the leading "./" is omitted
and/or
b.) the full path to the current directory is inserted (enclosed by brackets and a blank)... (1 Reply)
Discussion started by: pstein
1 Replies
7. Shell Programming and Scripting
Hello everyone
Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried
sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
Discussion started by: haggismn
10 Replies
8. Programming
Please take a look on following code:
s = socket(PF_INET, SOCK_STREAM, 0); //socket
fcntl(s, F_SETFL, O_NONBLOCK); //set socket to nonblock
retry_conn:
ret = connect(s, (struct sockaddr *)&serv_addr, sizeof(struct sockaddr_in)); // try to connect, for sure... (7 Replies)
Discussion started by: revolta25
7 Replies
9. Shell Programming and Scripting
These three finds worked as expected:
$ find . -iname "*.PDF"
$ find . -iname "*.PDF" \( ! -name "*_nobackup.*" \)
$ find . -path "*_nobackup*" -prune -iname "*.PDF"
They all returned the match:
./folder/file.pdf
:b:
This find returned no matches:
$ find . -path "*_nobackup*" -prune... (3 Replies)
Discussion started by: wolfv
3 Replies
10. Shell Programming and Scripting
Look at the following data file(cou.data) which has four fields separated by tab.
Four fields are country name, land area, population, continent where it belongs.
As for country name or continent name which has two words, two words are separated by space.
(Data are not accurately... (1 Reply)
Discussion started by: chihuyu
1 Replies
LEARN ABOUT REDHAT
encoding
encoding(n) Tcl Built-In Commands encoding(n)
__________________________________________________________________________________________________________________________________________________
NAME
encoding - Manipulate encodings
SYNOPSIS
encoding option ?arg arg ...?
_________________________________________________________________
INTRODUCTION
Strings in Tcl are encoded using 16-bit Unicode characters. Different operating system interfaces or applications may generate strings in
other encodings such as Shift-JIS. The encoding command helps to bridge the gap between Unicode and these other formats.
DESCRIPTION
Performs one of several encoding related operations, depending on option. The legal options are:
encoding convertfrom ?encoding? data
Convert data to Unicode from the specified encoding. The characters in data are treated as binary data where the lower 8-bits of
each character is taken as a single byte. The resulting sequence of bytes is treated as a string in the specified encoding. If
encoding is not specified, the current system encoding is used.
encoding convertto ?encoding? string
Convert string from Unicode to the specified encoding. The result is a sequence of bytes that represents the converted string.
Each byte is stored in the lower 8-bits of a Unicode character. If encoding is not specified, the current system encoding is used.
encoding names
Returns a list containing the names of all of the encodings that are currently available.
encoding system ?encoding?
Set the system encoding to encoding. If encoding is omitted then the command returns the current system encoding. The system encod-
ing is used whenever Tcl passes strings to system calls.
EXAMPLE
It is common practice to write script files using a text editor that produces output in the euc-jp encoding, which represents the ASCII
characters as singe bytes and Japanese characters as two bytes. This makes it easy to embed literal strings that correspond to non-ASCII
characters by simply typing the strings in place in the script. However, because the source command always reads files using the ISO8859-1
encoding, Tcl will treat each byte in the file as a separate character that maps to the 00 page in Unicode. The resulting Tcl strings will
not contain the expected Japanese characters. Instead, they will contain a sequence of Latin-1 characters that correspond to the bytes of
the original string. The encoding command can be used to convert this string to the expected Japanese Unicode characters. For example,
set s [encoding convertfrom euc-jp "xA4xCF"]
would return the Unicode string "u306F", which is the Hiragana letter HA.
SEE ALSO
Tcl_GetEncoding(3)
KEYWORDS
encoding
Tcl 8.1 encoding(n)