Set HSQL script newline format - persistence

We have a HSQL .script file in source control. Some of our developers use Linux, some use Windows. Each time there is a commit we have to deal with conflicts (each line in file has one) due to platform specific newline characters in script.
Is there a way to specify newline format for the HSQL script file.

You cannot specify the end of line (eol) format for the HSQLDB script. HSQLDB can read the .script file regardless of the eol format used when the file was saved.
Source control system usually allow to specify the eol format to use for text files. For example, Subversion has a svn:eol-style property which can be set to "native" for all or individual files.

Related

Apache Netbeans changing default delimiter

Despite having changed the pcs regional delimiter to a "." Netbeans 12 is still using a ",". I have tried adding the following to the netbeans.conf file but it has no effect:
-J-Duser.language=en -J-Duser.country=US
How do you force netbeans to use a particular local via the conf file?
I had changed the delimiter on win 10 but not the entire format for the pc. By changing the whole format to English UK, Netbeans honours the change.

Encoding - Pydev changes character automatically

I am encoding every py script in my project to utf-8, as we are definitely migrating our application from Jython 2.2.1 to Jython 2.5.2. For that reason, I have added a 'magic comment' at the first line of every py file (#encoding=utf-8) and I have started testing whether everything is OK by debugging the application in Eclipse.
The problem appears in a script that contains the string straße, because it is automatically converted to straße.
My doubt is if this change is caused by Pydev or it happens because utf-8 doesn't cover this kind of characters.
What can I do to automatically avoid this issue with other 'strange' strings I haven't detected yet?
Are you sure your .py files use UTF-8 encoding? Try to open it with WebBrowser (as text) and check various encodings. While you see straße if seems that ß is encoded by two bytes (most probably UTF-8) but ensure it is really UTF-8.
Also check in Eclipse settings on Project/Properties. There is Resource panel with "Text file encoding" setting (I use Eclipse only for Java projects and do not know if Pydev uses this setting).
Try such code with PyDev and check if result file contains UTF-8 text:
# -*- coding: utf8 -*-
import codecs
f = codecs.open('strasse.txt', 'wb', 'UTF-8')
f.write('straße'.decode('UTF-8'))
f.close()
My guess is that you had a different encoding at that file (say cp1252, which is the default windows encoding) and when you put utf-8 it became garbled (so, it wasn't really PyDev who garbled it, but the fact that it was previously in another encoding).
While you're at it, also make sure you also set the default encoding for Eclipse to utf-8 (which is usually the default platform encoding) -- you can do this at preferences > general > workspace.
As a note, I believe the most common way of putting that comment is #coding: utf-8, followed by #-*- coding: utf-8 -*- (i.e.: not #encoding:utf-8) -- although all those formats work (see pep: https://www.python.org/dev/peps/pep-0263/)

How to set the encoding of a SSIS "Script task" file of a Visual Studio 2008 SSIS project

In My SSIS script task I need to refer to ressources (eg. database tables) that contain special european characters. How do I force my script file (C# code) to be stored using another encoding such as UTF-8.
At the moment I have to escaping the characters using \uXXX which is near unreadable.
While I'm waiting on a repro, how I think you would accomplish this is the same manner you would use to save any file out with encoding in VS/SSMS
I added some arabic looking text in there, assuming that would qualify as UTF-8
Closing and re-opening the script task retains the script.

eclipse - svn synchronize - file differs only in line feed

I'm working in a group where there are developers that use linux, windows and mac.
Often happens that in SVN repository text files have different text file line delimiters (CR / CRLF / LF).
Someone know if I could avoid to compare line delimiters during eclipse svn synchronize?
You can set an svn:eol-style propery on files, possibly even using automatic properties in svn (in linux that would usually be the [auto-props] section in ~/.subversion/config )

How do I "source" something in my .vimrc file?

I've been working on expanding my vim-foo lately and I've run across a couple of plugins (autotag.vim for example) that require them to be "sourced" in my .vimrc file. What exactly does this mean and how do I do it?
Sourcing a file is 'executing' it. Essentially, each line of the file is considered a command. Sourcing it is the same as typing each command in order. You source with the command :source (usually shortened to :so).
So if you source myStuff.vim
:so myStuff.vim
and if myStuff.vim contained these lines
set xx iI just intersted this<C-]>
set yy bbbb4dw
It's the same as if you typed those commands into Vim
:set xx iI just intersted this<C-]>
:set yy bbbb4dw
The only file sourced by default is the .vimrc(_vimrc on windows) so that's a place you can keep all the commands you use to set up Vim every time.
Where it gets interesting is the fact that since a sourced file is just a series of commands, and sourcing is a command, you can source files from your source files. So plugins you use every time could be sourced when you start up Vim by adding a line to your .vimrc like this
so myPlugin.vim
Files in your .vim/plugin directory are sourced (loaded) automatically.
There is always the :source file command. I usually write .vimrc that contains custom commands and what not for the console application and then a .gvimrc that contains additional goodies that are appropriate for a windowed version. My .gvimrc starts with source $HOME/.vimrc to pick up everything from the console version before adding in new stuff.
There are normally two vimrc files, one is _vimrc and the other _gvimrc (in the first one are the things for vim, and in the second for gvim - graphical things) - although most people I know just put everything in _vimrc.
A good practice is to keep all your extra files (plugins, colorschemes, snippets ...) in a separate (your own) vimfiles directory (which you can take with you).
If you do
:help vimfiles
vim will tell your vimfiles directory should be located. It depends somewhat on the platform (win, unix). On windows the usual is in your user folder (documents and settings, then user ...).
In vimfiles directory there are a couple of subdirectories. Amongst them is the "plugin" subdirectory. Plugins put in that dir will be loaded automatically (also plugins put in subdirectories of "plugin").
If you do not wish to load it automatically, just put it in your "vimfiles", or some other directory, and
:so plugin_name.vim (with the appropriate path)
(you can use the $vim, $vimfiles, and $home as shortcuts when defining path to plugin)