Sponsored Content
Top Forums Shell Programming and Scripting Shifting of data because of special characters Post 303018838 by pchang on Saturday 16th of June 2018 09:44:47 PM
Old 06-16-2018
Quote:
Originally Posted by RudiC
What encoding / character set do you use? What locale? Are your (text) tools multibyte encoding capable?
Thanks for all of your replies.

We are using an ETL tool (informatica) to generate the file. Codepage is currently MS Windows Latin 1 and there are other codepages we can select from.

Not sure what the locale is - how do I find that out?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

special characters

I have one file which is named ^? ( the DEL character ) I'd like to know how to rename or copy the file by using its i-node number TYIA (2 Replies)
Discussion started by: nawnaw
2 Replies

2. UNIX and Linux Applications

get rid of special characters

Hi Friends, we have recently installed RHEL4.4 and when i give the commd ls -l > tt it prints the file name with some special charactes like ^[[00m1 in the begining of the file name and at the end of the file name. I wanted to use the file names of removing it before taking the backup and... (4 Replies)
Discussion started by: vakharia Mahesh
4 Replies

3. Shell Programming and Scripting

Special characters

When I open a file in vi, I see the following characters: \302\240 Can someone explain what these characters mean. Is it ASCII format? I need to trim those characters from a file. I am doing the following: tr -d '\302\240' ---------- Post updated at 08:35 PM ---------- Previous... (1 Reply)
Discussion started by: sid1982
1 Replies

4. Shell Programming and Scripting

remove special characters

hello all I am writing a perl code and i wish to remove the special characters for text. I wish to remove all extended ascii characters. If the list of special characters is huge, how can i do this using substitute command s/specialcharacters/null/g I really want to code like... (3 Replies)
Discussion started by: vasuarjula
3 Replies

5. UNIX for Dummies Questions & Answers

How to see special characters?

Hi all, I was wondering how can i see the special characters like \t, \n or anything else in a file by using Nano or any other linux command like less, more etc (6 Replies)
Discussion started by: gvj
6 Replies

6. Shell Programming and Scripting

special characters

Hey guys, I'm trying to replace "]Facebook" from the text but sed 's/]Facebook/Johan/g' is not working could you please help me with that? (6 Replies)
Discussion started by: Johanni
6 Replies

7. Shell Programming and Scripting

Replace special characters with Escape characters?

i need to replace the any special characters with escape characters like below. test!=123-> test\!\=123 !@#$%^&*()-= to be replaced by \!\@\#\$\%\^\&\*\(\)\-\= (8 Replies)
Discussion started by: laknar
8 Replies

8. Shell Programming and Scripting

HOw to find special characters

I have flat file which has data like this glid¿as_liste¿025175456 How can I print these lines into new file? (4 Replies)
Discussion started by: sol_nov
4 Replies

9. UNIX for Advanced & Expert Users

special characters in IF TEST

I'm using Korn shell. I'm doing an IF TEST for lots of characters and don't know how to also check for single quote and parentheses and slash. I'm reading a file and some records have garbage characters in them. The following works, but how do I add single quote, parentheses and slash to the IF... (3 Replies)
Discussion started by: sboxtops
3 Replies

10. Shell Programming and Scripting

Insert and shifting data at column

Hi all, i have data like this joe : 1 :a bob : 2 :b sue : 3 :c foo : 4 :d at column 2 i want to insert TOP to the top column and at column 3 i want to insert BOTTOM to the bottom column. and the result will... (12 Replies)
Discussion started by: psychop13
12 Replies
RUNE(3) 						   BSD Library Functions Manual 						   RUNE(3)

NAME
setrunelocale, setinvalidrune, sgetrune, sputrune, fgetrune, fungetrune, fputrune -- rune support for C LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <rune.h> #include <errno.h> int setrunelocale(char *locale); void setinvalidrune(rune_t rune); rune_t sgetrune(const char *string, size_t n, char const **result); int sputrune(rune_t rune, char *string, size_t n, char **result); #include <stdio.h> long fgetrune(FILE *stream); int fungetrune(rune_t rune, FILE *stream); int fputrune(rune_t rune, FILE *stream); DESCRIPTION
The 4.4BSD ``rune'' functions have been deprecated in favour of the ISO C99 extended multibyte and wide character facilities and should not be used in new applications. Consider using setlocale(3), mbrtowc(3), wcrtomb(3), fgetwc(3), ungetwc(3), and fputwc(3) instead. The setrunelocale() controls the type of encoding used to represent runes as multibyte strings as well as the properties of the runes as defined in <ctype.h>. The locale argument indicates which locale to load. If the locale is successfully loaded, 0 is returned, otherwise an errno value is returned to indicate the type of error. The setinvalidrune() function sets the value of the global value _INVALID_RUNE to be rune. The sgetrune() function tries to read a single multibyte character from string, which is at most n bytes long. If sgetrune() is successful, the rune is returned. If result is not NULL, *result will point to the first byte which was not converted in string. If the first n bytes of string do not describe a full multibyte character, _INVALID_RUNE is returned and *result will point to string. If there is an encoding error at the start of string, _INVALID_RUNE is returned and *result will point to the second character of string. the sputrune() function tries to encode rune as a multibyte string and store it at string, but no more than n bytes will be stored. If result is not NULL, *result will be set to point to the first byte in string following the new multibyte character. If string is NULL, *result will point to (char *)0 + x, where x is the number of bytes that would be needed to store the multibyte value. If the multibyte character would consist of more than n bytes and result is not NULL, *result will be set to NULL. In all cases, sputrune() will return the number of bytes which would be needed to store rune as a multibyte character. The fgetrune() function operates the same as sgetrune() with the exception that it attempts to read enough bytes from stream to decode a sin- gle rune. It returns either EOF on end of file, _INVALID_RUNE on an encoding error, or the rune decoded if all went well. The fungetrune() function pushes the multibyte encoding, as provided by sputrune(), of rune onto stream such that the next fgetrune() call will return rune. It returns EOF if it fails and 0 on success. The fputrune() function writes the multibyte encoding of rune, as provided by sputrune(), onto stream. It returns EOF on failure and 0 on success. RETURN VALUES
The setrunelocale() function returns one of the following values: 0 The setrunelocale() function was successful. [EINVAL] The locale name was incorrect. [ENOENT] The locale could not be found. [EFTYPE] The file found was not a valid file. The sgetrune() function either returns the rune read or _INVALID_RUNE. The sputrune() function returns the number of bytes needed to store rune as a multibyte string. FILES
$PATH_LOCALE/locale/LC_CTYPE /usr/share/locale/locale/LC_CTYPE binary LC_CTYPE file for the locale locale. /usr/local/share/locale/locale/LC_CTYPE binary LC_CTYPE file for the locale locale. SEE ALSO
mbrune(3), setlocale(3), euc(4), utf2(4), utf8(5) HISTORY
These functions first appeared in 4.4BSD. The setrunelocale() function and the other non-ANSI rune functions were inspired by Plan 9 from Bell Labs. BSD
October 6, 2002 BSD
All times are GMT -4. The time now is 06:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy