Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

JDBC Connection Failure - Charset

3 posts in General Discussion Last posting was on 2012-04-30 19:11:37.0Z
MikeB Posted on 2012-04-30 17:59:17.0Z
Sender: a8a.4f9ed011.1804289383@sybase.com
From: MikeB
Newsgroups: sybase.public.ase.general
Subject: JDBC Connection Failure - Charset
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4f9ed2f5.b0d.1681692777@sybase.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="-=_forums-1-dub4f9ed2f5"
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 30 Apr 2012 10:59:17 -0700
X-Trace: forums-1-dub 1335808757 172.20.134.41 (30 Apr 2012 10:59:17 -0700)
X-Original-Trace: 30 Apr 2012 10:59:17 -0700, 172.20.134.41
Lines: 183
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31063
Article PK: 73955

I have a new instance (no user data) that is failing to JDBC
connections due to returned values for the character set.
Isql and SQL Central appear to be working fine and report
the default charset as iso_1. That attached connection dump
shows junk where the charset should be.

Any all help would be appreciated as I have been fighting
this for 2 days. now.


Bret Halford Posted on 2012-04-30 18:44:00.0Z
From: Bret Halford <bret@sybase.com>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: JDBC Connection Failure - Charset
References: <4f9ed2f5.b0d.1681692777@sybase.com>
In-Reply-To: <4f9ed2f5.b0d.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4f9edd70$1@forums-1-dub>
Date: 30 Apr 2012 11:44:00 -0700
X-Trace: forums-1-dub 1335811440 10.22.241.152 (30 Apr 2012 11:44:00 -0700)
X-Original-Trace: 30 Apr 2012 11:44:00 -0700, vip152.sybase.com
Lines: 33
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31064
Article PK: 73953


On 4/30/2012 11:59 AM, MikeB wrote:
> I have a new instance (no user data) that is failing to JDBC
> connections due to returned values for the character set.
> Isql and SQL Central appear to be working fine and report
> the default charset as iso_1. That attached connection dump
> shows junk where the charset should be.
>
> Any all help would be appreciated as I have been fighting
> this for 2 days. now.

Hi Mike,

I'm very far from being a JDBC expert, but from the messages
and the login packet, it looks to me that the client
character set is not being specified in the login packet.

Searching Google for "jtds character set could not find java equivalent"

The third hit down was
http://support.confio.com/kb/article/character-set-connection-errors/1623/,
which has a similar looking set of
circumstances. It suggests that what you might need to do is

----------------------------------
...set a JDBC property in the "Advanced Connection Properties" of the
"Register Database Wizard". For Example:

JTDS = charset=ISO-8859-9
----------------------------------

-bret


MikeB Posted on 2012-04-30 19:11:37.0Z
Sender: a8a.4f9ed011.1804289383@sybase.com
From: MikeB
Newsgroups: sybase.public.ase.general
Subject: Re: JDBC Connection Failure - Charset
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4f9ee3e9.ddb.1681692777@sybase.com>
References: <4f9edd70$1@forums-1-dub>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 30 Apr 2012 12:11:37 -0700
X-Trace: forums-1-dub 1335813097 172.20.134.41 (30 Apr 2012 12:11:37 -0700)
X-Original-Trace: 30 Apr 2012 12:11:37 -0700, 172.20.134.41
Lines: 47
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31065
Article PK: 73954


> On 4/30/2012 11:59 AM, MikeB wrote:
> > I have a new instance (no user data) that is failing to
> > JDBC connections due to returned values for the
> > character set. Isql and SQL Central appear to be working
> > fine and report the default charset as iso_1. That
> > attached connection dump shows junk where the charset
> should be. >
> > Any all help would be appreciated as I have been
> > fighting this for 2 days. now.
>
> Hi Mike,
>
> I'm very far from being a JDBC expert, but from the
> messages and the login packet, it looks to me that the
> client character set is not being specified in the login
> packet.
>
> Searching Google for "jtds character set could not find
> java equivalent"
>
> The third hit down was
>

http://support.confio.com/kb/article/character-set-connection-errors/1623/
,
> which has a similar looking set of
> circumstances. It suggests that what you might need to do
> is
>
> ----------------------------------
> ...set a JDBC property in the "Advanced Connection
> Properties" of the "Register Database Wizard". For
> Example:
>
> JTDS = charset=ISO-8859-9
> ----------------------------------
>
> -bret
>
Bret,
Thanx a bunch. Playing with the URL did result with a good
connection. All servers are reporting default charset as
iso_1 but for some unknown reason the URL for this server
needed the charset parameter:

jdbc:jtds:sybase://LHX002CE9241VQ1:5000;DatabaseName=master;charset=iso_1

Thanx again for your quick response.