Groups | Blog | Home
all groups > sql server programming > october 2004 >

sql server programming : Unicode output in Stored Procedure?


oj
10/28/2004 2:58:13 PM
Displaying is the function of the client app. If your client app is capable
of displaying unicode, Nchar/Nvarchar/nText resultset should do.


[quoted text, click to view]

Lucas Tam
10/28/2004 9:19:30 PM
I am having trouble displaying unicode characters in a stored procedure.

Is there anything I need to set to output unicode output?

I am trying to display chinese text, but when I output it, I get question
marks in the place of chinese text (?).

Thanks.


--
Lucas Tam (REMOVEnntp@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
bartd NO[at]SPAM online.microsoft.com
10/29/2004 5:33:57 PM
- Use Query Analyzer (it is a fully Unicode app) to verify that your T-SQL
is OK.
- Select a font capable of displaying Chinese characters for the Results
pane (if the characters are retrieved intact but the font can't display
them, the chars will show up as black boxes).
- If you have any literal Unicode text strings in the proc, make sure you
prefix the literal with an N as discussed in
http://support.microsoft.com/?id=239530.
- Make sure that any stored proc parameters, local variables, temp table
columns, etc that the Chinese text will be stored in are nvarchar/nchar,
not varchar/char.
- If you are passing Unicode text to a stored proc as a parameter using a
language event, you must also use the N prefix for the parameter string
literal.

Bart
------------
Bart Duncan
Microsoft SQL Server Support

Please reply to the newsgroup only - thanks.
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
| From: "oj" <nospam_ojngo@home.com>
| References: <Xns9590B03C35CABnntprogerscom@140.99.99.130>
| Subject: Re: Unicode output in Stored Procedure?
| Date: Thu, 28 Oct 2004 14:58:13 -0700
| Lines: 22
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
| Message-ID: <OwZ$$kTvEHA.612@TK2MSFTNGP15.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.programming
| NNTP-Posting-Host: fw.pdx.polyserve.com 216.64.170.67
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15
.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.programming:481511
| X-Tomcat-NG: microsoft.public.sqlserver.programming
|
| Displaying is the function of the client app. If your client app is
capable
| of displaying unicode, Nchar/Nvarchar/nText resultset should do.
|
|
[quoted text, click to view]
| > I am having trouble displaying unicode characters in a stored procedure.
| >
| > Is there anything I need to set to output unicode output?
| >
| > I am trying to display chinese text, but when I output it, I get
question
| > marks in the place of chinese text (?).
| >
| > Thanks.
| >
| >
| > --
| > Lucas Tam (REMOVEnntp@rogers.com)
| > Please delete "REMOVE" from the e-mail address when replying.
| > http://members.ebay.com/aboutme/coolspot18/
|
|
|
Lucas Tam
11/9/2004 7:01:35 AM
"oj" <nospam_ojngo@home.com> wrote in
news:OwZ$$kTvEHA.612@TK2MSFTNGP15.phx.gbl:

[quoted text, click to view]


I figured out my error - one of my declared variables was varchar... thus
dropping the unicode output.

--
Lucas Tam (REMOVEnntp@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
AddThis Social Bookmark Button