# Problem with special characters

**URL:** <https://forum.liquibase.org/t/problem-with-special-characters/102>\
**Category:** General Discussion\
**Created:** [June 18, 2009, 8:14am UTC](https://forum.liquibase.org/t/problem-with-special-characters/102 "2009-06-18T08:14:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![gambitz](https://avatars.discourse-cdn.com/v4/letter/g/4da419/32.png) [@gambitz](https://forum.liquibase.org/u/gambitz)\
**Post date:** [June 18, 2009, 8:14am UTC](https://forum.liquibase.org/t/problem-with-special-characters/102/1 "2009-06-18T08:14:00Z")

</div>

Hi,

i tried to generate a changelog from an existing database (mssql 2000, very hard to change cuz of poorly legacy software).  
I’ve used the ms jdbc drivers for msql 2000 and 2005 with the current liquibase version 1.9.3

Unfortunately liquibase quit the task with the message:  
liquibase.exception.JDBCException: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name ‘FBL’.

The name of the column is “FBL-Street”, so i assume its a problem with “special” characters like " "&nbsp; “,”&nbsp; “-” and so on  
Another database without this “corrupted” names worked well

i have no clue how to work around this problem, there is nothing helpful to configure in the connection string

Is there a way to read this database without changing it?

greetings

Marco

---

<div class="post-metadata">

**Author:** ![taranenko](https://avatars.discourse-cdn.com/v4/letter/t/ee7513/32.png) [@taranenko](https://forum.liquibase.org/u/taranenko)\
**Post date:** [June 18, 2009, 8:14am UTC](https://forum.liquibase.org/t/problem-with-special-characters/102/2 "2009-06-18T08:14:00Z")

</div>

Marco,

generally speaking such stuff should be escaped. For example select [FBL-street] from [city-address-of-Fbl] does not break sql syntax.  
And liquibase try to escape ones. If not this is bug and should be filed in jira.  
What exactly you doing?

Cheers, Oleg

---

<div class="post-metadata">

**Author:** ![gambitz](https://avatars.discourse-cdn.com/v4/letter/g/4da419/32.png) [@gambitz](https://forum.liquibase.org/u/gambitz)\
**Post date:** [June 18, 2009, 8:14am UTC](https://forum.liquibase.org/t/problem-with-special-characters/102/3 "2009-06-18T08:14:00Z")

</div>

Hi Oleg,

i just start “java -jar liquibase-1.9.3.jar generatechangelog” on the command shell, with the proper configuration in the file liquibase.properties:

classpath=lib/sqljdbc.jar;  
changeLogFile=Changelog.xml  
username=\*\*\*\*\*\*\*  
password=\*\*\*\*\*\*\*  
logLevel=finest  
logFile=log.txt  
url=jdbc:sqlserver://localhost;databaseName=mp;

Yeah this names should be escaped for sure, but how?

Is there anyone to confirm this behavior as a bug?

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [June 18, 2009, 8:14am UTC](https://forum.liquibase.org/t/problem-with-special-characters/102/4 "2009-06-18T08:14:00Z")

</div>

I think it is a bug in 1.9.3, but it has been fixed in trunk for the upcoming 2.0.&nbsp; I ran into it myself lately :)&nbsp;

I’ll backport the fix to the 1.9 branch and put a snapshot up for you to try.&nbsp; I’ll let you know when it’s ready.

Nathan

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [June 18, 2009, 8:14am UTC](https://forum.liquibase.org/t/problem-with-special-characters/102/5 "2009-06-18T08:14:00Z")

</div>

I guess I had put a fix in already, but probably post-1.9.3.&nbsp; Try downloading [http://www.liquibase.org/liquibase-SNAPSHOT.jar](http://www.liquibase.org/liquibase-SNAPSHOT.jar) and see if that helps you.

Nathan

---

<div class="post-metadata">

**Author:** ![gambitz](https://avatars.discourse-cdn.com/v4/letter/g/4da419/32.png) [@gambitz](https://forum.liquibase.org/u/gambitz)\
**Post date:** [June 18, 2009, 8:14am UTC](https://forum.liquibase.org/t/problem-with-special-characters/102/6 "2009-06-18T08:14:00Z")

</div>

> _Originally posted by: Nathan_  
> I guess I had put a fix in already, but probably post-1.9.3.&nbsp; Try downloading [http://www.liquibase.org/liquibase-SNAPSHOT.jar](http://www.liquibase.org/liquibase-SNAPSHOT.jar) and see if that helps you.
> 
> Nathan

Hi Nathan,

thank you for your quick response.  
It worked well with your posted snapshot.

I found another bug that I could solve by editing the changelog

The generated changelog misses spaces in some cases - eg.

select fieldname as modifiedfieldnameFrom tablename

This seems to concern alot of keywords (from, group, where, union and order)

Marco

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [June 18, 2009, 8:14am UTC](https://forum.liquibase.org/t/problem-with-special-characters/102/7 "2009-06-18T08:14:00Z")

</div>

Do you have an actual example of a bad part of the generated changelog and the sql it is generating?&nbsp;

---

<div class="post-metadata">

**Author:** ![gambitz](https://avatars.discourse-cdn.com/v4/letter/g/4da419/32.png) [@gambitz](https://forum.liquibase.org/u/gambitz)\
**Post date:** [June 18, 2009, 8:14am UTC](https://forum.liquibase.org/t/problem-with-special-characters/102/8 "2009-06-18T08:14:00Z")

</div>

windows notepad causes the problem

notepad removes any occurrences of /u000d /u000d /u000a or \r\n\n

i think its a line break inconsistence thing  
other editors (visual studio, cooktop) also asking to correct the line breaks
