Unix Technical Forum

Asking again - ResultSet.getString() & unicode

This is a discussion on Asking again - ResultSet.getString() & unicode within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> Hi Dave, Since I haven't definitely reproduced the problem in my environment, it'll be hard for me to ask ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > MS SQL ODBC

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 02-27-2008, 09:54 PM
Steven Cheng[MSFT]
 
Posts: n/a
Default RE: Asking again - ResultSet.getString() & unicode

Hi Dave,

Since I haven't definitely reproduced the problem in my environment, it'll
be hard for me to ask the dev guys or other SQL related support specialist
to do some further research. Would you attach a simple test sqldatabase's
mdf file to me so that I can test on my side to see whether I can reproduce
the problem?

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: Asking again - ResultSet.getString() & unicode
| thread-index: AcW5Raj0lD2dS+gDQRGxZ5H878wqiw==
| X-WBNR-Posting-Host: 199.45.247.98
| From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam>
| References: <CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
<7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
<B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
<mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
<10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
<181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
<te8egO3tFHA.3160@TK2MSFTNGXA01.phx.gbl>
<4EC5B775-37CA-4D32-8890-8F5DD6B0FFFD@microsoft.com>
<YXQ0hhPuFHA.768@TK2MSFTNGXA01.phx.gbl>
| Subject: RE: Asking again - ResultSet.getString() & unicode
| Date: Wed, 14 Sep 2005 09:02:08 -0700
| Lines: 199
| Message-ID: <D1BEA6E6-7BA6-46E1-ACFD-5A2712E40BFA@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.odbc
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2709
| X-Tomcat-NG: microsoft.public.sqlserver.odbc
|
| Hi;
|
| I stepped through the hibernate code. They call conn.createStatement()
which
| works for me too. The problem is when I call
| conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE,
| | ResultSet.CONCUR_UPDATABLE) - that then has the problem on calling
| getString().
|
| If conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE,
| | ResultSet.CONCUR_UPDATABLE) works for you then that is the difference
| between our systems.
|
| Can you ask the JDBC team if they can reproduce this?
|
| --
| thanks - dave
|
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi Dave,
| >
| > I'm not sure what's the difference between our DB. But since you
mentioned
| > that the hibernate component can correctly process the Unicode data
through
| > the jdbc driver, I'd recommend you have a look at hibernate's code. Is
it
| > source available? If not, you can consider using some decompiler such
as
| > the Djava tool to decompile the related class file to see what's the
| > difference between your code and hibernate's code.
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| >
| > --------------------
| > | Thread-Topic: Asking again - ResultSet.getString() & unicode
| > | thread-index: AcW3lq1e/d65l1dpS2qrNVZsyl78fQ==
| > | X-WBNR-Posting-Host: 199.45.247.98
| > | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam>
| > | References: <CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
| > <7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
| > <B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
| > <mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
| > <10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
| > <181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
| > <te8egO3tFHA.3160@TK2MSFTNGXA01.phx.gbl>
| > | Subject: RE: Asking again - ResultSet.getString() & unicode
| > | Date: Mon, 12 Sep 2005 05:37:03 -0700
| > | Lines: 116
| > | Message-ID: <4EC5B775-37CA-4D32-8890-8F5DD6B0FFFD@microsoft.com>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.sqlserver.odbc
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2695
| > | X-Tomcat-NG: microsoft.public.sqlserver.odbc
| > |
| > | Ok, here's some interesting results:
| > |
| > | First, please keep in mind that if I use hibernate
(www.hibernate.org) I
| > can
| > | insert and select with no problems on my system. So I don't think
it's a
| > | configuration issue but instead some setting needed.
| > |
| > | If I add the N then it inserts fine. Obviously this doesn't help in
the
| > | select.
| > |
| > | If I create a database using BOPOMOFO for the collation, then if I
insert
| > | without the N, the chinese character inserts correctly, but the
russian
| > | character does not. The select still fails for both characters.
| > |
| > | So I think the answer for an insert is to use the N'unicode_string'
as
| > that
| > | solves that problem. But to select, I still can't get it with
| > | conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE,
| > | ResultSet.CONCUR_UPDATABLE)
| > |
| > | Any further ideas?
| > |
| > | --
| > | thanks - dave
| > |
| > |
| > | "Steven Cheng[MSFT]" wrote:
| > |
| > | > Hi Dave,
| > | >
| > | > I still think the problem should be environment specific since on
my
| > local
| > | > environment, no matter I use
| > | >
| > | > Statement stmt = conn.createStatement();
| > | >
| > | > or
| > | >
| > | > Statement stmt =
| > conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE,
| > | > ResultSet.CONCUR_UPDATABLE);
| > | >
| > | > I can get the unicode string correctly from sqlserver. Also, for
| > inserting,
| > | > I can directly insert unicode in the following style:
| > | >
| > | > "\u98a8";
| > | >
| > | > What's your database's Collation setting? Though from my test ,
this
| > | > doesn't change the result, I think you can try set the collation to
a
| > | > codepage which can correctly interpret the wide chars. In
addition, in
| > | > T-SQL, when we inserting unicode string, it's recommended that we
add
| > "N"
| > | > Prefix for each string value, so you can try using the following
insert
| > | > statement to see whether it can insert unicode correctly:
| > | >
| > | > public static boolean InsertNewUser (String name, String email)
throws
| > | > Exception{
| > | >
| > | > Connection conn = getConnection();
| > | >
| > | > String sql = "insert g_user values(N'" + name + "',
N'"
| > +
| > | > email + "')";
| > | >
| > | > ....................................
| > | >
| > | > }
| > | >
| > | >
| > | > Hope helps. Thanks,
| > | >
| > | > Steven Cheng
| > | > Microsoft Online Support
| > | >
| > | > Get Secure! www.microsoft.com/security
| > | > (This posting is provided "AS IS", with no warranties, and confers
no
| > | > rights.)
| > | >
| > | >
| > | > --------------------
| > | > | Thread-Topic: Asking again - ResultSet.getString() & unicode
| > | > | thread-index: AcW1eMlyyC/Dmw/1QQyoC1z0+TfdCA==
| > | > | X-WBNR-Posting-Host: 199.45.247.98
| > | > | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam>
| > | > | References: <CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
| > | > <7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
| > | > <B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
| > | > <mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
| > | > <10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
| > | > | Subject: RE: Asking again - ResultSet.getString() & unicode
| > | > | Date: Fri, 9 Sep 2005 12:58:03 -0700
| > | > | Lines: 10
| > | > | Message-ID: <181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
| > | > | MIME-Version: 1.0
| > | > | Content-Type: text/plain;
| > | > | charset="Utf-8"
| > | > | Content-Transfer-Encoding: 7bit
| > | > | X-Newsreader: Microsoft CDO for Windows 2000
| > | > | Content-Class: urn:content-classes:message
| > | > | Importance: normal
| > | > | Priority: normal
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | > | Newsgroups: microsoft.public.sqlserver.odbc
| > | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | > | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2691
| > | > | X-Tomcat-NG: microsoft.public.sqlserver.odbc
| > | > |
| > | > | Sometimes a picture shows things a lot better so you can find
your
| > code
| > | > with
| > | > | some minor changes I made, and screen shots of the database at
| > | > | http://www.windward.net/jdbc2.zip
| > | > |
| > | > | Note that the first row I inserted by hand - it was not created
by
| > your
| > | > | program.
| > | > |
| > | > | --
| > | > | thanks - dave
| > | > |
| > | > |
| > | >
| > | >
| > |
| >
| >
|

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 02-27-2008, 09:54 PM
=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=
 
Posts: n/a
Default RE: Asking again - ResultSet.getString() & unicode

I can't find a way to attach but if you email me I'll email you back the
file. david@windward.net

--
thanks - dave


"Steven Cheng[MSFT]" wrote:

> Hi Dave,
>
> Since I haven't definitely reproduced the problem in my environment, it'll
> be hard for me to ask the dev guys or other SQL related support specialist
> to do some further research. Would you attach a simple test sqldatabase's
> mdf file to me so that I can test on my side to see whether I can reproduce
> the problem?
>
> Thanks,
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
> --------------------
> | Thread-Topic: Asking again - ResultSet.getString() & unicode
> | thread-index: AcW5Raj0lD2dS+gDQRGxZ5H878wqiw==
> | X-WBNR-Posting-Host: 199.45.247.98
> | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam>
> | References: <CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
> <7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
> <B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
> <mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
> <10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
> <181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
> <te8egO3tFHA.3160@TK2MSFTNGXA01.phx.gbl>
> <4EC5B775-37CA-4D32-8890-8F5DD6B0FFFD@microsoft.com>
> <YXQ0hhPuFHA.768@TK2MSFTNGXA01.phx.gbl>
> | Subject: RE: Asking again - ResultSet.getString() & unicode
> | Date: Wed, 14 Sep 2005 09:02:08 -0700
> | Lines: 199
> | Message-ID: <D1BEA6E6-7BA6-46E1-ACFD-5A2712E40BFA@microsoft.com>
> | MIME-Version: 1.0
> | Content-Type: text/plain;
> | charset="Utf-8"
> | Content-Transfer-Encoding: 7bit
> | X-Newsreader: Microsoft CDO for Windows 2000
> | Content-Class: urn:content-classes:message
> | Importance: normal
> | Priority: normal
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | Newsgroups: microsoft.public.sqlserver.odbc
> | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
> | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2709
> | X-Tomcat-NG: microsoft.public.sqlserver.odbc
> |
> | Hi;
> |
> | I stepped through the hibernate code. They call conn.createStatement()
> which
> | works for me too. The problem is when I call
> | conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE,
> | | ResultSet.CONCUR_UPDATABLE) - that then has the problem on calling
> | getString().
> |
> | If conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE,
> | | ResultSet.CONCUR_UPDATABLE) works for you then that is the difference
> | between our systems.
> |
> | Can you ask the JDBC team if they can reproduce this?
> |
> | --
> | thanks - dave
> |
> |
> | "Steven Cheng[MSFT]" wrote:
> |
> | > Hi Dave,
> | >
> | > I'm not sure what's the difference between our DB. But since you
> mentioned
> | > that the hibernate component can correctly process the Unicode data
> through
> | > the jdbc driver, I'd recommend you have a look at hibernate's code. Is
> it
> | > source available? If not, you can consider using some decompiler such
> as
> | > the Djava tool to decompile the related class file to see what's the
> | > difference between your code and hibernate's code.
> | >
> | > Thanks,
> | >
> | > Steven Cheng
> | > Microsoft Online Support
> | >
> | > Get Secure! www.microsoft.com/security
> | > (This posting is provided "AS IS", with no warranties, and confers no
> | > rights.)
> | >
> | >
> | >
> | > --------------------
> | > | Thread-Topic: Asking again - ResultSet.getString() & unicode
> | > | thread-index: AcW3lq1e/d65l1dpS2qrNVZsyl78fQ==
> | > | X-WBNR-Posting-Host: 199.45.247.98
> | > | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam>
> | > | References: <CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
> | > <7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
> | > <B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
> | > <mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
> | > <10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
> | > <181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
> | > <te8egO3tFHA.3160@TK2MSFTNGXA01.phx.gbl>
> | > | Subject: RE: Asking again - ResultSet.getString() & unicode
> | > | Date: Mon, 12 Sep 2005 05:37:03 -0700
> | > | Lines: 116
> | > | Message-ID: <4EC5B775-37CA-4D32-8890-8F5DD6B0FFFD@microsoft.com>
> | > | MIME-Version: 1.0
> | > | Content-Type: text/plain;
> | > | charset="Utf-8"
> | > | Content-Transfer-Encoding: 7bit
> | > | X-Newsreader: Microsoft CDO for Windows 2000
> | > | Content-Class: urn:content-classes:message
> | > | Importance: normal
> | > | Priority: normal
> | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | > | Newsgroups: microsoft.public.sqlserver.odbc
> | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
> | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | > | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2695
> | > | X-Tomcat-NG: microsoft.public.sqlserver.odbc
> | > |
> | > | Ok, here's some interesting results:
> | > |
> | > | First, please keep in mind that if I use hibernate
> (www.hibernate.org) I
> | > can
> | > | insert and select with no problems on my system. So I don't think
> it's a
> | > | configuration issue but instead some setting needed.
> | > |
> | > | If I add the N then it inserts fine. Obviously this doesn't help in
> the
> | > | select.
> | > |
> | > | If I create a database using BOPOMOFO for the collation, then if I
> insert
> | > | without the N, the chinese character inserts correctly, but the
> russian
> | > | character does not. The select still fails for both characters.
> | > |
> | > | So I think the answer for an insert is to use the N'unicode_string'
> as
> | > that
> | > | solves that problem. But to select, I still can't get it with
> | > | conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE,
> | > | ResultSet.CONCUR_UPDATABLE)
> | > |
> | > | Any further ideas?
> | > |
> | > | --
> | > | thanks - dave
> | > |
> | > |
> | > | "Steven Cheng[MSFT]" wrote:
> | > |
> | > | > Hi Dave,
> | > | >
> | > | > I still think the problem should be environment specific since on
> my
> | > local
> | > | > environment, no matter I use
> | > | >
> | > | > Statement stmt = conn.createStatement();
> | > | >
> | > | > or
> | > | >
> | > | > Statement stmt =
> | > conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE,
> | > | > ResultSet.CONCUR_UPDATABLE);
> | > | >
> | > | > I can get the unicode string correctly from sqlserver. Also, for
> | > inserting,
> | > | > I can directly insert unicode in the following style:
> | > | >
> | > | > "\u98a8";
> | > | >
> | > | > What's your database's Collation setting? Though from my test ,
> this
> | > | > doesn't change the result, I think you can try set the collation to
> a
> | > | > codepage which can correctly interpret the wide chars. In
> addition, in
> | > | > T-SQL, when we inserting unicode string, it's recommended that we
> add
> | > "N"
> | > | > Prefix for each string value, so you can try using the following
> insert
> | > | > statement to see whether it can insert unicode correctly:
> | > | >
> | > | > public static boolean InsertNewUser (String name, String email)
> throws
> | > | > Exception{
> | > | >
> | > | > Connection conn = getConnection();
> | > | >
> | > | > String sql = "insert g_user values(N'" + name + "',
> N'"
> | > +
> | > | > email + "')";
> | > | >
> | > | > ....................................
> | > | >
> | > | > }
> | > | >
> | > | >
> | > | > Hope helps. Thanks,
> | > | >
> | > | > Steven Cheng
> | > | > Microsoft Online Support
> | > | >
> | > | > Get Secure! www.microsoft.com/security
> | > | > (This posting is provided "AS IS", with no warranties, and confers
> no
> | > | > rights.)
> | > | >
> | > | >
> | > | > --------------------
> | > | > | Thread-Topic: Asking again - ResultSet.getString() & unicode
> | > | > | thread-index: AcW1eMlyyC/Dmw/1QQyoC1z0+TfdCA==
> | > | > | X-WBNR-Posting-Host: 199.45.247.98
> | > | > | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam>
> | > | > | References: <CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
> | > | > <7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
> | > | > <B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
> | > | > <mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
> | > | > <10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
> | > | > | Subject: RE: Asking again - ResultSet.getString() & unicode
> | > | > | Date: Fri, 9 Sep 2005 12:58:03 -0700
> | > | > | Lines: 10
> | > | > | Message-ID: <181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
> | > | > | MIME-Version: 1.0
> | > | > | Content-Type: text/plain;
> | > | > | charset="Utf-8"
> | > | > | Content-Transfer-Encoding: 7bit
> | > | > | X-Newsreader: Microsoft CDO for Windows 2000
> | > | > | Content-Class: urn:content-classes:message
> | > | > | Importance: normal
> | > | > | Priority: normal
> | > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | > | > | Newsgroups: microsoft.public.sqlserver.odbc
> | > | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
> | > | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | > | > | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2691
> | > | > | X-Tomcat-NG: microsoft.public.sqlserver.odbc
> | > | > |
> | > | > | Sometimes a picture shows things a lot better so you can find
> your
> | > code
> | > | > with
> | > | > | some minor changes I made, and screen shots of the database at
> | > | > | http://www.windward.net/jdbc2.zip
> | > | > |
> | > | > | Note that the first row I inserted by hand - it was not created
> by
> | > your
> | > | > | program.
> | > | > |
> | > | > | --
> | > | > | thanks - dave
> | > | > |
> | > | > |
> | > | >
> | > | >
> | > |
> | >
> | >
> |
>
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 02-27-2008, 09:54 PM
Steven Cheng[MSFT]
 
Posts: n/a
Default RE: Asking again - ResultSet.getString() & unicode

Hi Dave,

You can attach file if you're using OE to visit the newsgroup. Also, you
can send me the file through the email in my signature by removing the
"Online".

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: Asking again - ResultSet.getString() & unicode
| thread-index: AcW9L/98kyrUXBfbQIu56Bl3AmxeEQ==
| X-WBNR-Posting-Host: 199.45.247.98
| From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam>
| References: <CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
<7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
<B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
<mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
<10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
<181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
<te8egO3tFHA.3160@TK2MSFTNGXA01.phx.gbl>
<4EC5B775-37CA-4D32-8890-8F5DD6B0FFFD@microsoft.com>
<YXQ0hhPuFHA.768@TK2MSFTNGXA01.phx.gbl>
<D1BEA6E6-7BA6-46E1-ACFD-5A2712E40BFA@microsoft.com>
<joG6V8OvFHA.3020@TK2MSFTNGXA01.phx.gbl>
| Subject: RE: Asking again - ResultSet.getString() & unicode
| Date: Mon, 19 Sep 2005 08:37:09 -0700
| Lines: 282
| Message-ID: <12A5F861-C64B-4D7F-97A9-E371737FB552@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.odbc
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2733
| X-Tomcat-NG: microsoft.public.sqlserver.odbc
|
| I can't find a way to attach but if you email me I'll email you back the
| file. david@windward.net
|
| --
| thanks - dave
|
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi Dave,
| >
| > Since I haven't definitely reproduced the problem in my environment,
it'll
| > be hard for me to ask the dev guys or other SQL related support
specialist
| > to do some further research. Would you attach a simple test
sqldatabase's
| > mdf file to me so that I can test on my side to see whether I can
reproduce
| > the problem?
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| > --------------------
| > | Thread-Topic: Asking again - ResultSet.getString() & unicode
| > | thread-index: AcW5Raj0lD2dS+gDQRGxZ5H878wqiw==
| > | X-WBNR-Posting-Host: 199.45.247.98
| > | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam>
| > | References: <CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
| > <7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
| > <B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
| > <mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
| > <10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
| > <181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
| > <te8egO3tFHA.3160@TK2MSFTNGXA01.phx.gbl>
| > <4EC5B775-37CA-4D32-8890-8F5DD6B0FFFD@microsoft.com>
| > <YXQ0hhPuFHA.768@TK2MSFTNGXA01.phx.gbl>
| > | Subject: RE: Asking again - ResultSet.getString() & unicode
| > | Date: Wed, 14 Sep 2005 09:02:08 -0700
| > | Lines: 199
| > | Message-ID: <D1BEA6E6-7BA6-46E1-ACFD-5A2712E40BFA@microsoft.com>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.sqlserver.odbc
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2709
| > | X-Tomcat-NG: microsoft.public.sqlserver.odbc
| > |
| > | Hi;
| > |
| > | I stepped through the hibernate code. They call
conn.createStatement()
| > which
| > | works for me too. The problem is when I call
| > | conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE,
| > | | ResultSet.CONCUR_UPDATABLE) - that then has the problem on calling
| > | getString().
| > |
| > | If conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE,
| > | | ResultSet.CONCUR_UPDATABLE) works for you then that is the
difference
| > | between our systems.
| > |
| > | Can you ask the JDBC team if they can reproduce this?
| > |
| > | --
| > | thanks - dave
| > |
| > |
| > | "Steven Cheng[MSFT]" wrote:
| > |
| > | > Hi Dave,
| > | >
| > | > I'm not sure what's the difference between our DB. But since you
| > mentioned
| > | > that the hibernate component can correctly process the Unicode data
| > through
| > | > the jdbc driver, I'd recommend you have a look at hibernate's code.
Is
| > it
| > | > source available? If not, you can consider using some decompiler
such
| > as
| > | > the Djava tool to decompile the related class file to see what's
the
| > | > difference between your code and hibernate's code.
| > | >
| > | > Thanks,
| > | >
| > | > Steven Cheng
| > | > Microsoft Online Support
| > | >
| > | > Get Secure! www.microsoft.com/security
| > | > (This posting is provided "AS IS", with no warranties, and confers
no
| > | > rights.)
| > | >
| > | >
| > | >
| > | > --------------------
| > | > | Thread-Topic: Asking again - ResultSet.getString() & unicode
| > | > | thread-index: AcW3lq1e/d65l1dpS2qrNVZsyl78fQ==
| > | > | X-WBNR-Posting-Host: 199.45.247.98
| > | > | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam>
| > | > | References: <CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
| > | > <7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
| > | > <B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
| > | > <mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
| > | > <10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
| > | > <181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
| > | > <te8egO3tFHA.3160@TK2MSFTNGXA01.phx.gbl>
| > | > | Subject: RE: Asking again - ResultSet.getString() & unicode
| > | > | Date: Mon, 12 Sep 2005 05:37:03 -0700
| > | > | Lines: 116
| > | > | Message-ID: <4EC5B775-37CA-4D32-8890-8F5DD6B0FFFD@microsoft.com>
| > | > | MIME-Version: 1.0
| > | > | Content-Type: text/plain;
| > | > | charset="Utf-8"
| > | > | Content-Transfer-Encoding: 7bit
| > | > | X-Newsreader: Microsoft CDO for Windows 2000
| > | > | Content-Class: urn:content-classes:message
| > | > | Importance: normal
| > | > | Priority: normal
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | > | Newsgroups: microsoft.public.sqlserver.odbc
| > | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | > | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2695
| > | > | X-Tomcat-NG: microsoft.public.sqlserver.odbc
| > | > |
| > | > | Ok, here's some interesting results:
| > | > |
| > | > | First, please keep in mind that if I use hibernate
| > (www.hibernate.org) I
| > | > can
| > | > | insert and select with no problems on my system. So I don't think
| > it's a
| > | > | configuration issue but instead some setting needed.
| > | > |
| > | > | If I add the N then it inserts fine. Obviously this doesn't help
in
| > the
| > | > | select.
| > | > |
| > | > | If I create a database using BOPOMOFO for the collation, then if
I
| > insert
| > | > | without the N, the chinese character inserts correctly, but the
| > russian
| > | > | character does not. The select still fails for both characters.
| > | > |
| > | > | So I think the answer for an insert is to use the
N'unicode_string'
| > as
| > | > that
| > | > | solves that problem. But to select, I still can't get it with
| > | > | conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE,
| > | > | ResultSet.CONCUR_UPDATABLE)
| > | > |
| > | > | Any further ideas?
| > | > |
| > | > | --
| > | > | thanks - dave
| > | > |
| > | > |
| > | > | "Steven Cheng[MSFT]" wrote:
| > | > |
| > | > | > Hi Dave,
| > | > | >
| > | > | > I still think the problem should be environment specific since
on
| > my
| > | > local
| > | > | > environment, no matter I use
| > | > | >
| > | > | > Statement stmt = conn.createStatement();
| > | > | >
| > | > | > or
| > | > | >
| > | > | > Statement stmt =
| > | > conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE,
| > | > | > ResultSet.CONCUR_UPDATABLE);
| > | > | >
| > | > | > I can get the unicode string correctly from sqlserver. Also,
for
| > | > inserting,
| > | > | > I can directly insert unicode in the following style:
| > | > | >
| > | > | > "\u98a8";
| > | > | >
| > | > | > What's your database's Collation setting? Though from my test ,
| > this
| > | > | > doesn't change the result, I think you can try set the
collation to
| > a
| > | > | > codepage which can correctly interpret the wide chars. In
| > addition, in
| > | > | > T-SQL, when we inserting unicode string, it's recommended that
we
| > add
| > | > "N"
| > | > | > Prefix for each string value, so you can try using the
following
| > insert
| > | > | > statement to see whether it can insert unicode correctly:
| > | > | >
| > | > | > public static boolean InsertNewUser (String name, String email)
| > throws
| > | > | > Exception{
| > | > | >
| > | > | > Connection conn = getConnection();
| > | > | >
| > | > | > String sql = "insert g_user values(N'" + name +
"',
| > N'"
| > | > +
| > | > | > email + "')";
| > | > | >
| > | > | > ....................................
| > | > | >
| > | > | > }
| > | > | >
| > | > | >
| > | > | > Hope helps. Thanks,
| > | > | >
| > | > | > Steven Cheng
| > | > | > Microsoft Online Support
| > | > | >
| > | > | > Get Secure! www.microsoft.com/security
| > | > | > (This posting is provided "AS IS", with no warranties, and
confers
| > no
| > | > | > rights.)
| > | > | >
| > | > | >
| > | > | > --------------------
| > | > | > | Thread-Topic: Asking again - ResultSet.getString() & unicode
| > | > | > | thread-index: AcW1eMlyyC/Dmw/1QQyoC1z0+TfdCA==
| > | > | > | X-WBNR-Posting-Host: 199.45.247.98
| > | > | > | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?="
<thielen@nospam.nospam>
| > | > | > | References:
<CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
| > | > | > <7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
| > | > | > <B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
| > | > | > <mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
| > | > | > <10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
| > | > | > | Subject: RE: Asking again - ResultSet.getString() & unicode
| > | > | > | Date: Fri, 9 Sep 2005 12:58:03 -0700
| > | > | > | Lines: 10
| > | > | > | Message-ID:
<181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
| > | > | > | MIME-Version: 1.0
| > | > | > | Content-Type: text/plain;
| > | > | > | charset="Utf-8"
| > | > | > | Content-Transfer-Encoding: 7bit
| > | > | > | X-Newsreader: Microsoft CDO for Windows 2000
| > | > | > | Content-Class: urn:content-classes:message
| > | > | > | Importance: normal
| > | > | > | Priority: normal
| > | > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | > | > | Newsgroups: microsoft.public.sqlserver.odbc
| > | > | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | > | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | > | > | Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.sqlserver.odbc:2691
| > | > | > | X-Tomcat-NG: microsoft.public.sqlserver.odbc
| > | > | > |
| > | > | > | Sometimes a picture shows things a lot better so you can find
| > your
| > | > code
| > | > | > with
| > | > | > | some minor changes I made, and screen shots of the database
at
| > | > | > | http://www.windward.net/jdbc2.zip
| > | > | > |
| > | > | > | Note that the first row I inserted by hand - it was not
created
| > by
| > | > your
| > | > | > | program.
| > | > | > |
| > | > | > | --
| > | > | > | thanks - dave
| > | > | > |
| > | > | > |
| > | > | >
| > | > | >
| > | > |
| > | >
| > | >
| > |
| >
| >
|

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 02-27-2008, 09:55 PM
=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=
 
Posts: n/a
Default RE: Asking again - ResultSet.getString() & unicode

Hi;

I emailed you the file a couple of days ago - did you get it?

--
thanks - dave


"Steven Cheng[MSFT]" wrote:

> Hi Dave,
>
> You can attach file if you're using OE to visit the newsgroup. Also, you
> can send me the file through the email in my signature by removing the
> "Online".
>
> Thanks,
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
> --------------------
> | Thread-Topic: Asking again - ResultSet.getString() & unicode
> | thread-index: AcW9L/98kyrUXBfbQIu56Bl3AmxeEQ==
> | X-WBNR-Posting-Host: 199.45.247.98
> | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam>
> | References: <CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
> <7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
> <B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
> <mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
> <10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
> <181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
> <te8egO3tFHA.3160@TK2MSFTNGXA01.phx.gbl>
> <4EC5B775-37CA-4D32-8890-8F5DD6B0FFFD@microsoft.com>
> <YXQ0hhPuFHA.768@TK2MSFTNGXA01.phx.gbl>
> <D1BEA6E6-7BA6-46E1-ACFD-5A2712E40BFA@microsoft.com>
> <joG6V8OvFHA.3020@TK2MSFTNGXA01.phx.gbl>
> | Subject: RE: Asking again - ResultSet.getString() & unicode
> | Date: Mon, 19 Sep 2005 08:37:09 -0700
> | Lines: 282
> | Message-ID: <12A5F861-C64B-4D7F-97A9-E371737FB552@microsoft.com>
> | MIME-Version: 1.0
> | Content-Type: text/plain;
> | charset="Utf-8"
> | Content-Transfer-Encoding: 7bit
> | X-Newsreader: Microsoft CDO for Windows 2000
> | Content-Class: urn:content-classes:message
> | Importance: normal
> | Priority: normal
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | Newsgroups: microsoft.public.sqlserver.odbc
> | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
> | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2733
> | X-Tomcat-NG: microsoft.public.sqlserver.odbc
> |
> | I can't find a way to attach but if you email me I'll email you back the
> | file. david@windward.net
> |
> | --
> | thanks - dave
> |
> |
> | "Steven Cheng[MSFT]" wrote:
> |
> | > Hi Dave,
> | >
> | > Since I haven't definitely reproduced the problem in my environment,
> it'll
> | > be hard for me to ask the dev guys or other SQL related support
> specialist
> | > to do some further research. Would you attach a simple test
> sqldatabase's
> | > mdf file to me so that I can test on my side to see whether I can
> reproduce
> | > the problem?
> | >
> | > Thanks,
> | >
> | > Steven Cheng
> | > Microsoft Online Support
> | >
> | > Get Secure! www.microsoft.com/security
> | > (This posting is provided "AS IS", with no warranties, and confers no
> | > rights.)
> | > --------------------
> | > | Thread-Topic: Asking again - ResultSet.getString() & unicode
> | > | thread-index: AcW5Raj0lD2dS+gDQRGxZ5H878wqiw==
> | > | X-WBNR-Posting-Host: 199.45.247.98
> | > | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam>
> | > | References: <CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
> | > <7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
> | > <B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
> | > <mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
> | > <10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
> | > <181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
> | > <te8egO3tFHA.3160@TK2MSFTNGXA01.phx.gbl>
> | > <4EC5B775-37CA-4D32-8890-8F5DD6B0FFFD@microsoft.com>
> | > <YXQ0hhPuFHA.768@TK2MSFTNGXA01.phx.gbl>
> | > | Subject: RE: Asking again - ResultSet.getString() & unicode
> | > | Date: Wed, 14 Sep 2005 09:02:08 -0700
> | > | Lines: 199
> | > | Message-ID: <D1BEA6E6-7BA6-46E1-ACFD-5A2712E40BFA@microsoft.com>
> | > | MIME-Version: 1.0
> | > | Content-Type: text/plain;
> | > | charset="Utf-8"
> | > | Content-Transfer-Encoding: 7bit
> | > | X-Newsreader: Microsoft CDO for Windows 2000
> | > | Content-Class: urn:content-classes:message
> | > | Importance: normal
> | > | Priority: normal
> | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | > | Newsgroups: microsoft.public.sqlserver.odbc
> | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
> | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | > | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2709
> | > | X-Tomcat-NG: microsoft.public.sqlserver.odbc
> | > |
> | > | Hi;
> | > |
> | > | I stepped through the hibernate code. They call
> conn.createStatement()
> | > which
> | > | works for me too. The problem is when I call
> | > | conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE,
> | > | | ResultSet.CONCUR_UPDATABLE) - that then has the problem on calling
> | > | getString().
> | > |
> | > | If conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE,
> | > | | ResultSet.CONCUR_UPDATABLE) works for you then that is the
> difference
> | > | between our systems.
> | > |
> | > | Can you ask the JDBC team if they can reproduce this?
> | > |
> | > | --
> | > | thanks - dave
> | > |
> | > |
> | > | "Steven Cheng[MSFT]" wrote:
> | > |
> | > | > Hi Dave,
> | > | >
> | > | > I'm not sure what's the difference between our DB. But since you
> | > mentioned
> | > | > that the hibernate component can correctly process the Unicode data
> | > through
> | > | > the jdbc driver, I'd recommend you have a look at hibernate's code.
> Is
> | > it
> | > | > source available? If not, you can consider using some decompiler
> such
> | > as
> | > | > the Djava tool to decompile the related class file to see what's
> the
> | > | > difference between your code and hibernate's code.
> | > | >
> | > | > Thanks,
> | > | >
> | > | > Steven Cheng
> | > | > Microsoft Online Support
> | > | >
> | > | > Get Secure! www.microsoft.com/security
> | > | > (This posting is provided "AS IS", with no warranties, and confers
> no
> | > | > rights.)
> | > | >
> | > | >
> | > | >
> | > | > --------------------
> | > | > | Thread-Topic: Asking again - ResultSet.getString() & unicode
> | > | > | thread-index: AcW3lq1e/d65l1dpS2qrNVZsyl78fQ==
> | > | > | X-WBNR-Posting-Host: 199.45.247.98
> | > | > | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam>
> | > | > | References: <CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
> | > | > <7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
> | > | > <B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
> | > | > <mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
> | > | > <10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
> | > | > <181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
> | > | > <te8egO3tFHA.3160@TK2MSFTNGXA01.phx.gbl>
> | > | > | Subject: RE: Asking again - ResultSet.getString() & unicode
> | > | > | Date: Mon, 12 Sep 2005 05:37:03 -0700
> | > | > | Lines: 116
> | > | > | Message-ID: <4EC5B775-37CA-4D32-8890-8F5DD6B0FFFD@microsoft.com>
> | > | > | MIME-Version: 1.0
> | > | > | Content-Type: text/plain;
> | > | > | charset="Utf-8"
> | > | > | Content-Transfer-Encoding: 7bit
> | > | > | X-Newsreader: Microsoft CDO for Windows 2000
> | > | > | Content-Class: urn:content-classes:message
> | > | > | Importance: normal
> | > | > | Priority: normal
> | > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | > | > | Newsgroups: microsoft.public.sqlserver.odbc
> | > | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
> | > | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | > | > | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2695
> | > | > | X-Tomcat-NG: microsoft.public.sqlserver.odbc
> | > | > |
> | > | > | Ok, here's some interesting results:
> | > | > |
> | > | > | First, please keep in mind that if I use hibernate
> | > (www.hibernate.org) I
> | > | > can
> | > | > | insert and select with no problems on my system. So I don't think
> | > it's a
> | > | > | configuration issue but instead some setting needed.
> | > | > |
> | > | > | If I add the N then it inserts fine. Obviously this doesn't help
> in
> | > the
> | > | > | select.
> | > | > |
> | > | > | If I create a database using BOPOMOFO for the collation, then if
> I
> | > insert
> | > | > | without the N, the chinese character inserts correctly, but the
> | > russian
> | > | > | character does not. The select still fails for both characters.
> | > | > |
> | > | > | So I think the answer for an insert is to use the
> N'unicode_string'
> | > as
> | > | > that
> | > | > | solves that problem. But to select, I still can't get it with
> | > | > | conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE,
> | > | > | ResultSet.CONCUR_UPDATABLE)
> | > | > |
> | > | > | Any further ideas?
> | > | > |
> | > | > | --
> | > | > | thanks - dave
> | > | > |
> | > | > |
> | > | > | "Steven Cheng[MSFT]" wrote:
> | > | > |
> | > | > | > Hi Dave,
> | > | > | >
> | > | > | > I still think the problem should be environment specific since
> on
> | > my
> | > | > local
> | > | > | > environment, no matter I use
> | > | > | >
> | > | > | > Statement stmt = conn.createStatement();
> | > | > | >
> | > | > | > or
> | > | > | >
> | > | > | > Statement stmt =
> | > | > conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE,
> | > | > | > ResultSet.CONCUR_UPDATABLE);
> | > | > | >
> | > | > | > I can get the unicode string correctly from sqlserver. Also,
> for
> | > | > inserting,
> | > | > | > I can directly insert unicode in the following style:
> | > | > | >
> | > | > | > "\u98a8";
> | > | > | >
> | > | > | > What's your database's Collation setting? Though from my test ,
> | > this
> | > | > | > doesn't change the result, I think you can try set the
> collation to
> | > a
> | > | > | > codepage which can correctly interpret the wide chars. In
> | > addition, in
> | > | > | > T-SQL, when we inserting unicode string, it's recommended that
> we
> | > add
> | > | > "N"
> | > | > | > Prefix for each string value, so you can try using the
> following
> | > insert
> | > | > | > statement to see whether it can insert unicode correctly:
> | > | > | >
> | > | > | > public static boolean InsertNewUser (String name, String email)
> | > throws
> | > | > | > Exception{
> | > | > | >
> | > | > | > Connection conn = getConnection();
> | > | > | >
> | > | > | > String sql = "insert g_user values(N'" + name +
> "',
> | > N'"
> | > | > +
> | > | > | > email + "')";
> | > | > | >
> | > | > | > ....................................
> | > | > | >
> | > | > | > }
> | > | > | >
> | > | > | >
> | > | > | > Hope helps. Thanks,
> | > | > | >
> | > | > | > Steven Cheng
> | > | > | > Microsoft Online Support
> | > | > | >
> | > | > | > Get Secure! www.microsoft.com/security
> | > | > | > (This posting is provided "AS IS", with no warranties, and
> confers
> | > no
> | > | > | > rights.)
> | > | > | >
> | > | > | >
> | > | > | > --------------------
> | > | > | > | Thread-Topic: Asking again - ResultSet.getString() & unicode

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 02-27-2008, 09:55 PM
Steven Cheng[MSFT]
 
Posts: n/a
Default RE: Asking again - ResultSet.getString() & unicode

Hi Dave,

I've received your email and the zip file. I'll soon perform some tests on
it and let you know the results.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| Thread-Topic: Asking again - ResultSet.getString() & unicode
| thread-index: AcXAV7gnjNqQVmh/RCaxQCER3xClUg==
| X-WBNR-Posting-Host: 199.45.247.98
| From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam>
| References: <CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
<7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
<B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
<mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
<10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
<181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
<te8egO3tFHA.3160@TK2MSFTNGXA01.phx.gbl>
<4EC5B775-37CA-4D32-8890-8F5DD6B0FFFD@microsoft.com>
<YXQ0hhPuFHA.768@TK2MSFTNGXA01.phx.gbl>
<D1BEA6E6-7BA6-46E1-ACFD-5A2712E40BFA@microsoft.com>
<joG6V8OvFHA.3020@TK2MSFTNGXA01.phx.gbl>
<12A5F861-C64B-4D7F-97A9-E371737FB552@microsoft.com>
<YPqEeWcvFHA.768@TK2MSFTNGXA01.phx.gbl>
| Subject: RE: Asking again - ResultSet.getString() & unicode
| Date: Fri, 23 Sep 2005 08:59:03 -0700
| Lines: 310
| Message-ID: <CEC23198-16EB-435B-B703-847F60FD3075@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.odbc
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2750
| X-Tomcat-NG: microsoft.public.sqlserver.odbc
|
| Hi;
|
| I emailed you the file a couple of days ago - did you get it?
|
| --
| thanks - dave
|
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi Dave,
| >
| > You can attach file if you're using OE to visit the newsgroup. Also,
you
| > can send me the file through the email in my signature by removing the
| > "Online".
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| > --------------------
| > | Thread-Topic: Asking again - ResultSet.getString() & unicode
| > | thread-index: AcW9L/98kyrUXBfbQIu56Bl3AmxeEQ==
| > | X-WBNR-Posting-Host: 199.45.247.98
| > | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam>
| > | References: <CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
| > <7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
| > <B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
| > <mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
| > <10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
| > <181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
| > <te8egO3tFHA.3160@TK2MSFTNGXA01.phx.gbl>
| > <4EC5B775-37CA-4D32-8890-8F5DD6B0FFFD@microsoft.com>
| > <YXQ0hhPuFHA.768@TK2MSFTNGXA01.phx.gbl>
| > <D1BEA6E6-7BA6-46E1-ACFD-5A2712E40BFA@microsoft.com>
| > <joG6V8OvFHA.3020@TK2MSFTNGXA01.phx.gbl>
| > | Subject: RE: Asking again - ResultSet.getString() & unicode
| > | Date: Mon, 19 Sep 2005 08:37:09 -0700
| > | Lines: 282
| > | Message-ID: <12A5F861-C64B-4D7F-97A9-E371737FB552@microsoft.com>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.sqlserver.odbc
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2733
| > | X-Tomcat-NG: microsoft.public.sqlserver.odbc
| > |
| > | I can't find a way to attach but if you email me I'll email you back
the
| > | file. david@windward.net
| > |
| > | --
| > | thanks - dave
| > |
| > |
| > | "Steven Cheng[MSFT]" wrote:
| > |
| > | > Hi Dave,
| > | >
| > | > Since I haven't definitely reproduced the problem in my
environment,
| > it'll
| > | > be hard for me to ask the dev guys or other SQL related support
| > specialist
| > | > to do some further research. Would you attach a simple test
| > sqldatabase's
| > | > mdf file to me so that I can test on my side to see whether I can
| > reproduce
| > | > the problem?
| > | >
| > | > Thanks,
| > | >
| > | > Steven Cheng
| > | > Microsoft Online Support
| > | >
| > | > Get Secure! www.microsoft.com/security
| > | > (This posting is provided "AS IS", with no warranties, and confers
no
| > | > rights.)
| > | > --------------------
| > | > | Thread-Topic: Asking again - ResultSet.getString() & unicode
| > | > | thread-index: AcW5Raj0lD2dS+gDQRGxZ5H878wqiw==
| > | > | X-WBNR-Posting-Host: 199.45.247.98
| > | > | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam>
| > | > | References: <CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
| > | > <7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
| > | > <B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
| > | > <mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
| > | > <10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
| > | > <181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
| > | > <te8egO3tFHA.3160@TK2MSFTNGXA01.phx.gbl>
| > | > <4EC5B775-37CA-4D32-8890-8F5DD6B0FFFD@microsoft.com>
| > | > <YXQ0hhPuFHA.768@TK2MSFTNGXA01.phx.gbl>
| > | > | Subject: RE: Asking again - ResultSet.getString() & unicode
| > | > | Date: Wed, 14 Sep 2005 09:02:08 -0700
| > | > | Lines: 199
| > | > | Message-ID: <D1BEA6E6-7BA6-46E1-ACFD-5A2712E40BFA@microsoft.com>
| > | > | MIME-Version: 1.0
| > | > | Content-Type: text/plain;
| > | > | charset="Utf-8"
| > | > | Content-Transfer-Encoding: 7bit
| > | > | X-Newsreader: Microsoft CDO for Windows 2000
| > | > | Content-Class: urn:content-classes:message
| > | > | Importance: normal
| > | > | Priority: normal
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | > | Newsgroups: microsoft.public.sqlserver.odbc
| > | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | > | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2709
| > | > | X-Tomcat-NG: microsoft.public.sqlserver.odbc
| > | > |
| > | > | Hi;
| > | > |
| > | > | I stepped through the hibernate code. They call
| > conn.createStatement()
| > | > which
| > | > | works for me too. The problem is when I call
| > | > | conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE,
| > | > | | ResultSet.CONCUR_UPDATABLE) - that then has the problem on
calling
| > | > | getString().
| > | > |
| > | > | If conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE,
| > | > | | ResultSet.CONCUR_UPDATABLE) works for you then that is the
| > difference
| > | > | between our systems.
| > | > |
| > | > | Can you ask the JDBC team if they can reproduce this?
| > | > |
| > | > | --
| > | > | thanks - dave
| > | > |
| > | > |
| > | > | "Steven Cheng[MSFT]" wrote:
| > | > |
| > | > | > Hi Dave,
| > | > | >
| > | > | > I'm not sure what's the difference between our DB. But since
you
| > | > mentioned
| > | > | > that the hibernate component can correctly process the Unicode
data
| > | > through
| > | > | > the jdbc driver, I'd recommend you have a look at hibernate's
code.
| > Is
| > | > it
| > | > | > source available? If not, you can consider using some
decompiler
| > such
| > | > as
| > | > | > the Djava tool to decompile the related class file to see
what's
| > the
| > | > | > difference between your code and hibernate's code.
| > | > | >
| > | > | > Thanks,
| > | > | >
| > | > | > Steven Cheng
| > | > | > Microsoft Online Support
| > | > | >
| > | > | > Get Secure! www.microsoft.com/security
| > | > | > (This posting is provided "AS IS", with no warranties, and
confers
| > no
| > | > | > rights.)
| > | > | >
| > | > | >
| > | > | >
| > | > | > --------------------
| > | > | > | Thread-Topic: Asking again - ResultSet.getString() & unicode
| > | > | > | thread-index: AcW3lq1e/d65l1dpS2qrNVZsyl78fQ==
| > | > | > | X-WBNR-Posting-Host: 199.45.247.98
| > | > | > | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?="
<thielen@nospam.nospam>
| > | > | > | References:
<CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
| > | > | > <7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
| > | > | > <B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
| > | > | > <mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
| > | > | > <10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
| > | > | > <181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
| > | > | > <te8egO3tFHA.3160@TK2MSFTNGXA01.phx.gbl>
| > | > | > | Subject: RE: Asking again - ResultSet.getString() & unicode
| > | > | > | Date: Mon, 12 Sep 2005 05:37:03 -0700
| > | > | > | Lines: 116
| > | > | > | Message-ID:
<4EC5B775-37CA-4D32-8890-8F5DD6B0FFFD@microsoft.com>
| > | > | > | MIME-Version: 1.0
| > | > | > | Content-Type: text/plain;
| > | > | > | charset="Utf-8"
| > | > | > | Content-Transfer-Encoding: 7bit
| > | > | > | X-Newsreader: Microsoft CDO for Windows 2000
| > | > | > | Content-Class: urn:content-classes:message
| > | > | > | Importance: normal
| > | > | > | Priority: normal
| > | > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | > | > | Newsgroups: microsoft.public.sqlserver.odbc
| > | > | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | > | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | > | > | Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.sqlserver.odbc:2695
| > | > | > | X-Tomcat-NG: microsoft.public.sqlserver.odbc
| > | > | > |
| > | > | > | Ok, here's some interesting results:
| > | > | > |
| > | > | > | First, please keep in mind that if I use hibernate
| > | > (www.hibernate.org) I
| > | > | > can
| > | > | > | insert and select with no problems on my system. So I don't
think
| > | > it's a
| > | > | > | configuration issue but instead some setting needed.
| > | > | > |
| > | > | > | If I add the N then it inserts fine. Obviously this doesn't
help
| > in
| > | > the
| > | > | > | select.
| > | > | > |
| > | > | > | If I create a database using BOPOMOFO for the collation, then
if
| > I
| > | > insert
| > | > | > | without the N, the chinese character inserts correctly, but
the
| > | > russian
| > | > | > | character does not. The select still fails for both
characters.
| > | > | > |
| > | > | > | So I think the answer for an insert is to use the
| > N'unicode_string'
| > | > as
| > | > | > that
| > | > | > | solves that problem. But to select, I still can't get it
with
| > | > | > | conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE,
| > | > | > | ResultSet.CONCUR_UPDATABLE)
| > | > | > |
| > | > | > | Any further ideas?
| > | > | > |
| > | > | > | --
| > | > | > | thanks - dave
| > | > | > |
| > | > | > |
| > | > | > | "Steven Cheng[MSFT]" wrote:
| > | > | > |
| > | > | > | > Hi Dave,
| > | > | > | >
| > | > | > | > I still think the problem should be environment specific
since
| > on
| > | > my
| > | > | > local
| > | > | > | > environment, no matter I use
| > | > | > | >
| > | > | > | > Statement stmt = conn.createStatement();
| > | > | > | >
| > | > | > | > or
| > | > | > | >
| > | > | > | > Statement stmt =
| > | > | > conn.createStatement(ResultSet.TYPE_SCROLL_INSENSI TIVE,
| > | > | > | > ResultSet.CONCUR_UPDATABLE);
| > | > | > | >
| > | > | > | > I can get the unicode string correctly from sqlserver.
Also,
| > for
| > | > | > inserting,
| > | > | > | > I can directly insert unicode in the following style:
| > | > | > | >
| > | > | > | > "\u98a8";
| > | > | > | >
| > | > | > | > What's your database's Collation setting? Though from my
test ,
| > | > this
| > | > | > | > doesn't change the result, I think you can try set the
| > collation to
| > | > a
| > | > | > | > codepage which can correctly interpret the wide chars. In
| > | > addition, in
| > | > | > | > T-SQL, when we inserting unicode string, it's recommended
that
| > we
| > | > add
| > | > | > "N"
| > | > | > | > Prefix for each string value, so you can try using the
| > following
| > | > insert
| > | > | > | > statement to see whether it can insert unicode correctly:
| > | > | > | >
| > | > | > | > public static boolean InsertNewUser (String name, String
email)
| > | > throws
| > | > | > | > Exception{
| > | > | > | >
| > | > | > | > Connection conn = getConnection();
| > | > | > | >
| > | > | > | > String sql = "insert g_user values(N'" +
name +
| > "',
| > | > N'"
| > | > | > +
| > | > | > | > email + "')";
| > | > | > | >
| > | > | > | > ....................................
| > | > | > | >
| > | > | > | > }
| > | > | > | >
| > | > | > | >
| > | > | > | > Hope helps. Thanks,
| > | > | > | >
| > | > | > | > Steven Cheng
| > | > | > | > Microsoft Online Support
| > | > | > | >
| > | > | > | > Get Secure! www.microsoft.com/security
| > | > | > | > (This posting is provided "AS IS", with no warranties, and
| > confers
| > | > no
| > | > | > | > rights.)
| > | > | > | >
| > | > | > | >
| > | > | > | > --------------------
| > | > | > | > | Thread-Topic: Asking again - ResultSet.getString() &
unicode
|

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 02-27-2008, 09:55 PM
Steven Cheng[MSFT]
 
Posts: n/a
Default RE: Asking again - ResultSet.getString() & unicode

Hi Dave,

After testing through the database you provided on my side, I think the
problem is really environment and database specific. I've noticed that your
database's default collation is SQL_LATIN1..... while my test db 's
collation is the one which correspond to the widechar's chinese collation.
Also my test machine's SYSTEM LOCALE is also set to that chinese code page.
So I think this is the reason that cause the problem. You can try set all
these setting to the matched value to see whether they can make it works.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)







--------------------
| X-Tomcat-ID: 39818867
| References: <CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
<7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
<B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
<mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
<10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
<181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
<te8egO3tFHA.3160@TK2MSFTNGXA01.phx.gbl>
<4EC5B775-37CA-4D32-8890-8F5DD6B0FFFD@microsoft.com>
<YXQ0hhPuFHA.768@TK2MSFTNGXA01.phx.gbl>
<D1BEA6E6-7BA6-46E1-ACFD-5A2712E40BFA@microsoft.com>
<joG6V8OvFHA.3020@TK2MSFTNGXA01.phx.gbl>
<12A5F861-C64B-4D7F-97A9-E371737FB552@microsoft.com>
<YPqEeWcvFHA.768@TK2MSFTNGXA01.phx.gbl>
<CEC23198-16EB-435B-B703-847F60FD3075@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: stcheng@online.microsoft.com (Steven Cheng[MSFT])
| Organization: Microsoft
| Date: Mon, 26 Sep 2005 02:55:53 GMT
| Subject: RE: Asking again - ResultSet.getString() & unicode
| X-Tomcat-NG: microsoft.public.sqlserver.odbc
| Message-ID: <k$MXWXkwFHA.580@TK2MSFTNGXA01.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.odbc
| Lines: 351
| Path: TK2MSFTNGXA01.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2765
| NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
|
| Hi Dave,
|
| I've received your email and the zip file. I'll soon perform some tests
on
| it and let you know the results.
|
| Thanks,
|
| Steven Cheng
| Microsoft Online Support
|
| Get Secure! www.microsoft.com/security
| (This posting is provided "AS IS", with no warranties, and confers no
| rights.)
|
| --------------------
| | Thread-Topic: Asking again - ResultSet.getString() & unicode
| | thread-index: AcXAV7gnjNqQVmh/RCaxQCER3xClUg==
| | X-WBNR-Posting-Host: 199.45.247.98
| | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam>
| | References: <CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
| <7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
| <B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
| <mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
| <10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
| <181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
| <te8egO3tFHA.3160@TK2MSFTNGXA01.phx.gbl>
| <4EC5B775-37CA-4D32-8890-8F5DD6B0FFFD@microsoft.com>
| <YXQ0hhPuFHA.768@TK2MSFTNGXA01.phx.gbl>
| <D1BEA6E6-7BA6-46E1-ACFD-5A2712E40BFA@microsoft.com>
| <joG6V8OvFHA.3020@TK2MSFTNGXA01.phx.gbl>
| <12A5F861-C64B-4D7F-97A9-E371737FB552@microsoft.com>
| <YPqEeWcvFHA.768@TK2MSFTNGXA01.phx.gbl>
| | Subject: RE: Asking again - ResultSet.getString() & unicode
| | Date: Fri, 23 Sep 2005 08:59:03 -0700
| | Lines: 310
| | Message-ID: <CEC23198-16EB-435B-B703-847F60FD3075@microsoft.com>
| | MIME-Version: 1.0
| | Content-Type: text/plain;
| | charset="Utf-8"
| | Content-Transfer-Encoding: 7bit
| | X-Newsreader: Microsoft CDO for Windows 2000
| | Content-Class: urn:content-classes:message
| | Importance: normal
| | Priority: normal
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | Newsgroups: microsoft.public.sqlserver.odbc
| | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2750
| | X-Tomcat-NG: microsoft.public.sqlserver.odbc
| |
| | Hi;
| |
| | I emailed you the file a couple of days ago - did you get it?
| |
| | --
| | thanks - dave
| |
| |
| | "Steven Cheng[MSFT]" wrote:
| |
| | > Hi Dave,
| | >
| | > You can attach file if you're using OE to visit the newsgroup. Also,
| you
| | > can send me the file through the email in my signature by removing
the
| | > "Online".
| | >
| | > Thanks,
| | >
| | > Steven Cheng
| | > Microsoft Online Support
| | >
| | > Get Secure! www.microsoft.com/security
| | > (This posting is provided "AS IS", with no warranties, and confers no
| | > rights.)
| | > --------------------
| | > | Thread-Topic: Asking again - ResultSet.getString() & unicode
| | > | thread-index: AcW9L/98kyrUXBfbQIu56Bl3AmxeEQ==
| | > | X-WBNR-Posting-Host: 199.45.247.98
| | > | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam>
| | > | References: <CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
| | > <7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
| | > <B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
| | > <mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
| | > <10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
| | > <181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
| | > <te8egO3tFHA.3160@TK2MSFTNGXA01.phx.gbl>
| | > <4EC5B775-37CA-4D32-8890-8F5DD6B0FFFD@microsoft.com>
| | > <YXQ0hhPuFHA.768@TK2MSFTNGXA01.phx.gbl>
| | > <D1BEA6E6-7BA6-46E1-ACFD-5A2712E40BFA@microsoft.com>
| | > <joG6V8OvFHA.3020@TK2MSFTNGXA01.phx.gbl>
| | > | Subject: RE: Asking again - ResultSet.getString() & unicode
| | > | Date: Mon, 19 Sep 2005 08:37:09 -0700
| | > | Lines: 282
| | > | Message-ID: <12A5F861-C64B-4D7F-97A9-E371737FB552@microsoft.com>
| | > | MIME-Version: 1.0
| | > | Content-Type: text/plain;
| | > | charset="Utf-8"
| | > | Content-Transfer-Encoding: 7bit
| | > | X-Newsreader: Microsoft CDO for Windows 2000
| | > | Content-Class: urn:content-classes:message
| | > | Importance: normal
| | > | Priority: normal
| | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | > | Newsgroups: microsoft.public.sqlserver.odbc
| | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| | > | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2733
| | > | X-Tomcat-NG: microsoft.public.sqlserver.odbc
| | > |
| | > | I can't find a way to attach but if you email me I'll email you
back
| the
| | > | file. david@windward.net
| | > |
| | > | --
| | > | thanks - dave
| | > |
| | > |
| | > | "Steven Cheng[MSFT]" wrote:
| | > |
| | > | > Hi Dave,
| | > | >
| | > | > Since I haven't definitely reproduced the problem in my
| environment,
| | > it'll
| | > | > be hard for me to ask the dev guys or other SQL related support
| | > specialist
| | > | > to do some further research. Would you attach a simple test
| | > sqldatabase's
| | > | > mdf file to me so that I can test on my side to see whether I can
| | > reproduce
| | > | > the problem?
| | > | >
| | > | > Thanks,
| | > | >
| | > | > Steven Cheng
| | > | > Microsoft Online Support
| | > | >
| | > | > Get Secure! www.microsoft.com/security
| | > | > (This posting is provided "AS IS", with no warranties, and
confers
| no
| | > | > rights.)
| | > | > --------------------
| | > | > | Thread-Topic: Asking again - ResultSet.getString() & unicode
| | > | > | thread-index: AcW5Raj0lD2dS+gDQRGxZ5H878wqiw==
| | > | > | X-WBNR-Posting-Host: 199.45.247.98
| | > | > | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@nospam.nospam>
| | > | > | References:
<CEFAD23A-E1BA-479B-9923-511D6FDCE30A@microsoft.com>
| | > | > <7PGnYcEtFHA.1252@TK2MSFTNGXA02.phx.gbl>
| | > | > <B25E4840-9D02-4372-A9FE-0DCD48456968@microsoft.com>
| | > | > <mrGDGPRtFHA.768@TK2MSFTNGXA01.phx.gbl>
| | > | > <10F8AE17-DDB4-41B8-8D74-783D97E9E80F@microsoft.com>
| | > | > <181272BD-5477-4ECC-94C2-EF3D54A0C08F@microsoft.com>
| | > | > <te8egO3tFHA.3160@TK2MSFTNGXA01.phx.gbl>
| | > | > <4EC5B775-37CA-4D32-8890-8F5DD6B0FFFD@microsoft.com>
| | > | > <YXQ0hhPuFHA.768@TK2MSFTNGXA01.phx.gbl>
| | > | > | Subject: RE: Asking again - ResultSet.getString() & unicode
| | > | > | Date: Wed, 14 Sep 2005 09:02:08 -0700
| | > | > | Lines: 199
| | > | > | Message-ID: <D1BEA6E6-7BA6-46E1-ACFD-5A2712E40BFA@microsoft.com>
| | > | > | MIME-Version: 1.0
| | > | > | Content-Type: text/plain;
| | > | > | charset="Utf-8"
| | > | > | Content-Transfer-Encoding: 7bit
| | > | > | X-Newsreader: Microsoft CDO for Windows 2000
| | > | > | Content-Class: urn:content-classes:message
| | > | > | Importance: normal
| | > | > | Priority: normal
| | > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | > | > | Newsgroups: microsoft.public.sqlserver.odbc
| | > | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| | > | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| | > | > | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.odbc:2709
| | > | > | X-Tomcat-NG: microsoft.public.sqlserver.odbc
| | > | > |
| | > | > | Hi;
| | > | > |
| | > | > | I stepped through the hibernate code. They call
| | > conn.createStatement()
| | > | > which
| | > | > | works for me too. The problem is when I call
| | > | > | conn.createStatement(ResultSet.TYPE_SCROL