File encoding -- need to run dos2unix before passing to isql
a
anonymous
started a topic
about 11 years ago
[This topic is migrated from our old forums. The original author name has been removed]
Hi. What file encoding we should use (on Windows) to eliminate the need to apply dos2unix command before passing the sql to isql tool?
Some files just do not compile unless we run it through dos2unix command?
thanks...
Product: DbVisualizer Pro 9.1.2
Build: #2070 (2013/10/27 14:32)
Java VM: Java HotSpot(TM) Client VM
Java Version: 1.6.0_51
Java Vendor: Sun Microsystems Inc.
OS Name: Windows 7
OS Arch: x86
OS Version: 6.1
Re: File encoding -- need to run dos2unix before passing to isql
Hi Alex,
What procedure are you following in DbVisualizer when the SQL is passed to the other tool? Such as export, save, copy/paste, drag&drop.
Regards
Roger
a
anonymous
said
about 11 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: File encoding -- need to run dos2unix before passing to isql
We usually send it to SourceSafe for version keeping and then to TortoiseSVN which then sends it to the HP deployment tool that sends it to isql for actual execution :)
What I tried to do, i opened the script in dbvis, changed encoding to us-ascii, saved it, uploaded directly to unix box, ran through isql and it failed..
Then i ran dos2unix on that file and isql compiled it.
And it is not every file that I have to do it on.. It seems when a file has a combination of comments -- and /* */ then something weird is happening.
None the less, it comes down to encoding, since after dos2unix isql takes it w/o issues. Again, not all files i have to run through that command..
Roger Bjärevall
said
about 11 years ago
[This reply is migrated from our old forums.]
Re: File encoding -- need to run dos2unix before passing to isql
Alex,
What unix2dos and dos2unix does is to transform the newline character(s) (\r\n on Windows and \n on Unix/Linux/Mac) in the file. As far as I know these doesn't consider file encoding.
The SQL Editor in DbVisualizer preserve the newline character(s) when a file is being loaded and at save these will re-appear in the file (there is no conversion made). So if for example loading a file created on Windows in DbVisualizer running on a UNIX box all \r\n (including any added new lines in the editor) will be retained when the file is saved.
May it be so that the files you are working on has been created in different OSes? This would then explain that it works for some files while others need to be converted.
Regards
Roger
a
anonymous
said
about 11 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: File encoding -- need to run dos2unix before passing to isql
Hi. Yes, i know that ;) i was just explaining the process that I follow per your question.
So I guess the issue is somewhere else, outside the dbVis.
Thanks for your help!
anonymous