Wrong delimiter in Informatica output file - informatica

I have created a informatica workflow. The target is made as a flat file. The delimiter used is \037 with UTF-8 encoding, but the output file created contains , as the delimiter. It works fine with other WF's i have created.
How to get the required delimiter in the output file.
Regards
Sriram

Just check once if it is only \037 or ,\037 in delimiter. And also check the same in session in set file properties for the flat file target.

Related

Python application cannot search for strings that contain utf-8 characters

I have created a small tool using Tkinter that enters a string using entry widget , search for that string in multiple files and displays the list of file names that contains that string in listbox. All the files are utf-8 encoded already.
Now the problem is, when I run my code from IDE(Pycharm), and input search string that contains a utf-8 character in the tool UI, it works fine and searched all files that contains it.
But if I create a exe file of that code(using py2exe), and launch the tool , enter the same string, it cannot search and code continues to search non-stop.(With non- utf-8 characters, it works fine)
In the application code, I have 'imported codecs' and opened file using command
codecs.open(SourceFile, encoding ='utf-8')
Please help me to solve this problem that how exe file can also work correct and search strings successfully.

How to replace or ignore the Accented characters in SSIS

I have a SSIS package which reads the input file first & then validate it and then process the same. The validation is being carried through Script Task.
When the file is processed i am getting an error "invalid character in the given encoding". When verified i identified that this is due to the Accented character present in the file first name: André.
I tried replacing these characters in the xslt file using the replace(normalize-unicode()) function but its not working because the script task is being called initially.
Can anyone help me in ignoring/replacing these special character while processing the file?
In a dataflow task you can replace values using the applicable unicode hex value. The following code replaces three common accent marks with a blank space:
(DT_STR,500,1252)TRIM(REPLACE(REPLACE(REPLACE([YOUR_FIELD],"\x0060",""),"\x00B4",""),"\x02CB",""))
Find more here: http://www.utf8-chartable.de/

Informatica Flat File into Flat File gives Quotes

I have a basic informatica load. Flat file to Flat file and no transformations.
My source flat file does not have quotes.
EX: A B C D
When I run my job I get quotes.
EX: "A" "B" "C" "D"
Please help!
In the session, target file properties, you can set your preferences regarding double quote, single quote or no quote.
Set Optional Quotes to none in session, target file properties
Set File Properties
Delimited -> Advanced
Set Optional Quotes to None

wrong text encoding on linux

I downloaded a source code .rar file from internet to my linux server. Then, I extract all source files into local directory. When I use "cat" command to see the content of each file, the wrong text encoding is shown on my terminal (There are some chinese characters in the source file).
I use
file -bi testapi.cpp
then shows:
text/plain; charset=iso-8859-1
I tried to convert that file to uft-8 encoding with following command:
iconv -f ISO88591 -t UTF8 testapi.cpp > new.cpp
But it doesn't work.
I set my .vimrc file with following two lines:
set encoding=utf-8
set fileencoding=utf-8
After this, when I vim testapi.cpp, the chinese characters will be normally displayed in the vim. But cat testapi.cpp doesn't work.
When I compile and run the program, the printf statement with chinese characters will print wrong characters like ????
What should I do to display correct chinese characters when I run the program?
TLDR Quickest Solution: Copy/Paste the Visible Text to a Brand-New, Confirmed UTF-8 File
Your file is marked as latin1, but the data is stored as utf8.
When you set set-enc=utf8 or set fileencoding=utf-8 in VIM, you're not changing the data or converting it. You're looking at the same exact data, but interpreting as if it is the utf8 charset. So, good news: Your data is good. No conversion or changing necessary.
You just need to put the same exact data into a file already marked as UTF-8 encoding. That can be done easily by simply making a brand new file in vim, using set enc=utf8, and then copy-pasting your old data into the new file. You can test this out by making a testfile with the only text "汉语" ("chinese language"), set enc, save, close, reopen, and see that the text didn't get corrupted. And you can test with file -bi $pathtofile, though that is not super reliable.
Anyway, TLDR: Make a brand new UTF-8 file, confirm that it's utf-8, make your data visible, and then copy/paste and/or transfer it to the new UTF-8 file, without doing any conversion.
Also, theoretically, I considered that iconv -f utf8 -t utf8 would work, since all I wanted to do was make utf-8-encoded data be marked as utf-8-encoded, without changing it. But this gave me an error that indicated it was still trying to do a data conversion.

Load pipe delimited file in Weka

Hi I'm trying to load pipe delimited file in weka using java CSVLoader. Looks like CSVLoader only loads comma and tab. Is there a way i can change the delimiter on these loaders ?
Has anyone loaded a pipe separated file in Weka ?
Thanks,
Amit
The new version does allow you to enter a delimiter or separator using option -F option. See: http://weka.sourceforge.net/doc.dev/weka/core/converters/CSVLoader.html
Doesn't look like there are any options to give different delimiters. Just read the file first and replace pipes with commas?