Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4605804
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:28:51+00:00 2026-05-22T00:28:51+00:00

I’m trying to pass Japanese characters to a stored procedure in SQL Server. The

  • 0

I’m trying to pass Japanese characters to a stored procedure in SQL Server. The characters get converted to ???? during execution and hence I get incoreect results.

How do I pass them such characters? I tried using nvarchar as its accepts Unicode, but no luck. If I do not use stored procedure and construct the SQL Query string dynamically in my app, things work fine.
Kindly help

Update

declare @string as nvarchar(1000)
SET @string = @keyword 
SELECT * FROM TABLE where Title like @string 

Called using

EXEC @return_value = StoredProcName 
@keyword = N'Japanese Word' 

Update 2

I would like to add the following if that helps. Constructing the query dynamically works. So if in your app you were to write
sql = “select * from TABLE where Title like ‘”+[JapaneseWord]+”‘”;
it works. I am unable to determine where the Unicode is failing for a stored proc

Solution

NVARCHAR is the key to the problem. In case anyone is interested is knowing how to use it to form a freetext search string, here you go

declare @string as nvarchar(100)
set @string = 'FORMSOF(INLFLECTIONAL,"'+@string+'"))'


Then use it in your query. Like
select * from TABLE as TEMP INNERJOIN CONTAINSTABLE(#,#,@string) ......

Refer MSDN or relevant docs

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T00:28:51+00:00Added an answer on May 22, 2026 at 12:28 am

    You definitely need to use NVARCHAR as your data type, and if you run this in SQL server Mgmt Studio or from an “inline” SQL query, you need to make sure to prefix the string literals with a N'.....' prefix.

    So, your stored proc should look something like:

    CREATE PROCEDURE dbo.YourProc  @Param1 NVARCHAR(100)
    AS
       SELECT N'Test - [' + @Param1 + N'] - end of test'
    

    And then call this using:

    EXEC dbo.YourProc   N'foo-bar-value'
    

    Should yield:

    Test - [foo-bar-value] - end of test
    

    and of course this would be much nicer if I knew how to get some Japanese characters in here…. 🙂

    Update: OK, I’ve picked some random Cyrillic and Thai characters, which I’m positive require NVARCHAR, too – and it would appear to me that it works:

    EXEC dbo.YourProc   N'Є Ї Љ Њ Ќ Ѝ Ў А Й Ж М Р Б'
    
    Test - [Є Ї Љ Њ Ќ Ѝ Ў А Й Ж М Р Б] - end of test
    
    EXEC dbo.YourProc   N'฿ ᴂ ᴆ ᴌ ᴔ ᴓ ᴙ ᴚ ᴝ ᴭ ᴦ ᴣ ᴟ'
    
    Test - [฿ ᴂ ᴆ ᴌ ᴔ ᴓ ᴙ ᴚ ᴝ ᴭ ᴦ ᴣ ᴟ] - end of test
    

    Not sure why this Unicode-based test would work, and why it shouldn’t work with Japanese characters….

    Update #2: thanks for Wikipedia – this is said to mean “Tokyo”, in Hiragana – seems to work for me:

    EXEC dbo.YourProc   N'とうきょう'
    
    Test - [とうきょう] - end of test
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to loop through a bunch of documents I have to put
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a bunch of posts stored in text files formatted in yaml/textile (from
I want to count how many characters a certain string has in PHP, but
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I have a text area in my form which accepts all possible characters from
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.