SSIS how to save all files in UTF-8 format in a particular folder? - utf-8

I have many files 100 + in a folder which particular package is giving as a output.
From this folder I am currently manually saving all files in UTF -8 format before giving them for load into SAP server. This I am doing manually , Opening file in notepad then click on Save as , select UTF-8 as encoding and then save it.
But to do this for more than 100 files is really very time wasting and also leads to some human error.
I am aware about Flat file destination encoding but that is not converting the files in UTF-8 format , If i select this encoding on flat file destination and write output , then when i open that file in notepad again and when i click on save as I should see UTF-8 as encoding , but it is showing me ANSI.
Any help will save much time..

You can do this using an 'execute process task'.
1. Create a powershell script that changes the encoding on each file:
2. Save this script in a directory that is accessible by the ssis service account.
3. Add an 'execute process task' to your control flow.
4. Set the appropriate configuration values.

Related

CSV download is splitting into CSV and CSV.part

I'd like to download a CSV file from JupyterLab.
It's 66MB and it shows the file is downloading, but it's split into CSV and CSV.part.
According to JupyterLab, the download has finished but they haven't combined into a single CSV.
When I open the csv.part, it says there are no applications to open it.
When I open the csv, it's empty.
I've tried re-downloading and it's always the same.
What do I do here?
Whatever application you used to download the file - a web browser? Safari? Chrome? - downloads the data into a temporary file (with .part on the end) and it is supposed to rename it to myfile.csv after the download has completed.
For whatever reason, it has not done this last step.
Simply delete the empty file myfile.csv and rename myfile.csv.part to myfile.csv. You will see a warning ("Are you sure you want to rename this?") - yes. You are sure.
There is nothing magical about file name extensions, except of course that they tell MacOS which application to open the file with. They should also give you a clear indication of what sort of data is in the file, but this is not actually enforced by anything. If you rename a file to something inappropriate for the content (e.g. if you name your file "myfile.mp3"), it simply won't load into the application as the data isn't valid. But, there is nothing special about the .part file - the name is just supposed to indicate that the download (probably) hasn't finished yet. Except in this case, I assume you know that it has.
(This seems like a bug to me, perhaps with JupyterLab - but that's beside the point).

Convert Excel-XML to XLS

My task is to convert Excel .xls file to Excel-XML format file(here). Edit cell values and write it back to .xls.
Convert from xls to xml maybe can't be done automatically. Editing file is easy with XMLTABLE and XMLQUERY in Oracle. When I save XML content with XLS extension it give me Error:
The file you are trying to open MyFile.xls is in a different format than
specified by the file extension. Verify the file is not corrupted and
is from trusted source before opening the file. Do you want to open
the file now?
When I select "Yes" option file is opening and everything work fine. I want to avoid this Error/Warning message.
There is some way to convert Excel-XML file to other Excel's format and not xml? I know the problem is that I change only file extension without change format, but maybe there is solution hint excel to open file without Warning or convert to real xls.
Notes:
Error/Warning can be see displayed edit file content. Steps are: Open Excel file, Save as Excel XML(file is save with .xml extension), Close file, Rename file extension to .xls, Open file with Excel and Error is displayed.

How do I detect where is corrupted in a power point file?

I have a power point file(.pptx) generated by a program that copies xml files and content files in a slide to other slides. It simply extracts xml files and content files from original power point file and then copies xml files, finally compresses the files as a zip file and renames the file to xxxxx.pptx. (The xml files I mentioned here is, of course, about Office Open XML)
When I open this file in Keynote on Mac OS X, it works well. No error happened.
However when I use PowerPoint application on Mac OS X, the app says "PowerPoint found a problem with content in xxxxx.pptx"
I think there are differences between PowerPoint specs and Keynote specs, so I need to apply the generated pptx file to the PowerPoint specs.
But, the error does not say WHERE or WHAT ERROR IS OCCURRED, but says there are some errors in that file.
So I cannot look for where is damaged in the generated file!
How do I detect the errors in the file or validate the format of it?
I do not want to get 'restore tools' but 'error detection tools'.
I simply used Open XML SDK 2.5 Productivity Tool.
In my situation, it said the Content-Type of xml files was different from expected one when I opened the pptx file. Soon, it occurred to me I forgot to change the data in [Content_Types].xml
After I fixed it, the file is opened without problems now!!
This app also shows codes in C# and validate each xml files individually.
Download Link is here ->
https://www.microsoft.com/en-us/download/details.aspx?id=30425

In DBF, "Ñ" character is showed as "¥"

I open a DBF file in Visual FoxPro and it shows "Ñ" character as "¥". I haven't created that DBF, I just open it and read it.
My question is: Is there any way to show those "¥" characters correctly in FoxPro? Or does it mean that this DBF file was created wrongly?
You probably need to know which encoding was used when the file was saved, depending on the version number of the file. Also the MSDN has a dedicated page about this topic. https://msdn.microsoft.com/en-US/library/5b10d8b6(v=vs.80).aspx
In specific the first paragraph might be for your interest:
When you create .dbf files, Visual FoxPro automatically gives them
code page marks so that you can tell which code pages they use.
However, if you use .dbf files from previous versions of FoxPro, they
might not have code page marks. You can determine whether a .dbf file
has a code page mark by using the CPDBF( ) function after opening the
file or by having Visual FoxPro check when you open the file.
You need to set the proper code page of your DBF file.
To know it, open the file with DBF Commander Pro, click 'Tools -> Set Codepage', then try to set the proper encoding by choosing various encodings from the list (leave 'Preview' check box turned on):
The program has 30-day fully functional trial period, so you can do your task at no charge.

How can I make TFS2010/VS2010 save one solution file with a given encoding?

I have a batch file that executes during my build. Every time I check it in with changes, the file gets saved as UTF-8 (or UTF-16, hell I don't know), and thus gets a BOM. That makes it so that whenever the batch file is run, execution will fail because batch files have to be encoded as plain ASCII.
While it is simple to change the encoding on the file when I save it, I forget a lot of times.
Is there a way that I can get TFS or Visual Studio to ALWAYS save that one file in the proper format? (I know I can set VS up to always save all files as a certain type, but I was hoping I could make the change for just one file)
From within Source Control Explorer right-click the file you 're interested in & select 'Properties'.
On the 'General' tab there's the option to "Set Encoding". Check it out to see if you can find a suitable encoding to your purpose.

Resources