October 30, 2018 at 1:50 pm
Does anyone have a script to convert a file with UTF-8 encoding to UNICODE? Any help will be appreciated.
October 30, 2018 at 2:40 pm
EMtwo - Tuesday, October 30, 2018 1:50 PMDoes anyone have a script to convert a file with UTF-8 encoding to UNICODE? Any help will be appreciated.
That's not something you generally do with T-SQL. You could far more easily find something in VBScript or other procedural languages that can handle such a task far better than T-SQL could, somewhere on the web. Even Notepad++ might be a good option. The question, of course, is what part of your overall solution does this task represent, and are there limitations on where said program would need to run? You have to be somewhat careful with existing executables that are downloaded from the web.
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
October 30, 2018 at 2:51 pm
True! Not all web recommendations for solutions are safest.
October 30, 2018 at 3:16 pm
EMtwo - Tuesday, October 30, 2018 1:50 PMDoes anyone have a script to convert a file with UTF-8 encoding to UNICODE? Any help will be appreciated.
UTF-8 is UNICODE. UTF stands for UNICODE Transformation Format. Did you need UTF-16 or UTF-32?
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
October 30, 2018 at 3:38 pm
Thank you for your response; I'm not sure. My purpose for wanting to do this conversion is to automate data load from a .csv file into a SQL server database table Using Bulk Insert. The extract file is in UTF-8 encoding which I am not sure Bulk insert supports - I stand to be corrected if I'm wrong. I have had to manually save the extract/.csv file with Unicode encoding.(see attached image) in order to load the data seamlessly. If I am able to convert the file from UTF-8, my automation can work smoothly.
I'm not sure if this "Unicode" is UTF-16 or UTF-32.
October 30, 2018 at 9:07 pm
drew.allen - Tuesday, October 30, 2018 3:16 PMEMtwo - Tuesday, October 30, 2018 1:50 PMDoes anyone have a script to convert a file with UTF-8 encoding to UNICODE? Any help will be appreciated.UTF-8 is UNICODE. UTF stands for UNICODE Transformation Format. Did you need UTF-16 or UTF-32?
Drew
UTF-16.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply