Hey all,
Just found your forum...Looks super rich with info! Can't wait to get through it all.
I am currently writing a web app in .net that telnets into a unix server (require uid + passwd), runs a command, and returns that output to be displayed on the web page.
I have gotten through the... (8 Replies)
Hi,
Can I know how to grep for lines with non-ascii characters in a file?
If not grep, at least can we do it with command-line perl or awk? I tried the functionality of perl, but still could not get the result. Any help??
PS: I was sure that someone should have asked this question... (9 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)
Hi, I need to do a global search and replacement of a non-ascii character. Let me first give the background of my problem.
Very frequently, I need to copy set of references from different sources. Typically, a reference would like this:
Banumathy et al., 2002 G. Banumathy, V. Singh and U.... (1 Reply)
A very simple question but I have scoured the web and can't find an answer. How do I search for a character by ASCII code in a regular expression using grep?
For example, we use the End of Medium symbol as a delimiter in certain files. (this is ascii 031 in oct, displays as ^Y) I want to grep... (6 Replies)
I have one file .dat file on windows server containg the following text
"Bürki"
Now When I am using FTP (get) command from UNIX server the text is appering is as "Bürki"
I want to preserve the text in the file on UNIX server as it is in source file.
Could you please suggest some... (2 Replies)
Hi,
In my file, for few field I have to print the next ASCII character for every character.
In the below file, I have to do for the 2,3 and 5th fields.
Input File
========
1|abc|def|5|ghi
2|jkl|mno|6|pqr
Expected
Ouput file
=======
1|bcd|efg|5|hij
2|klm|nop|6|qrs (2 Replies)
Hello
I have this special caracter after retreving rows from sql server:
"....spasses: • Entrem al valort 6050108002811 • El donem..."
I would like a sed command to remove it..or just know it's ascii code in order to replace it into my sql sentence.. Hope some one knows how to do that.... (7 Replies)
Hi Guru,
I have put one post yesterday and get answer. thanks for your help.
my question today is: what is ascii character for following non printable characters: ( we need filter these characters out in another process)
^MM-^E^MM-^E.
Old post link: ... (5 Replies)
Discussion started by: ken002
5 Replies
LEARN ABOUT FREEBSD
mbtowc
MBTOWC(3) BSD Library Functions Manual MBTOWC(3)NAME
mbtowc -- convert a character to a wide-character code
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
int
mbtowc(wchar_t * restrict wcharp, const char * restrict mbchar, size_t nbytes);
DESCRIPTION
The mbtowc() function converts a multibyte character mbchar into a wide character according to the current conversion state, and stores the
result in the object pointed to by wcharp. Up to nbytes bytes are examined.
A call with a null mbchar pointer returns nonzero if the current encoding requires shift states, zero otherwise; if shift states are
required, the shift state is reset to the initial state.
RETURN VALUES
If mbchar is NULL, the mbtowc() function returns nonzero if shift states are supported, zero otherwise.
Otherwise, if mbchar is not a null pointer, mbtowc() either returns 0 if mbchar represents the null wide character, or returns the number of
bytes processed in mbchar, or returns -1 if no multibyte character could be recognized or converted. In this case, mbtowc()'s internal con-
version state is undefined.
ERRORS
The mbtowc() function will fail if:
[EILSEQ] An invalid multibyte sequence was detected.
[EINVAL] The internal conversion state is invalid.
SEE ALSO btowc(3), mblen(3), mbrtowc(3), mbstowcs(3), multibyte(3), wctomb(3)STANDARDS
The mbtowc() function conforms to ISO/IEC 9899:1999 (``ISO C99'').
BSD April 11, 2004 BSD