get method with chinese character

Posted on 2009-04-22
Last Modified: 2012-06-21
Dear ASP experts,

i'm trying to do a dictionary search, I'm using a get variable and retrieving the result with request.querystring, If I pass an english word it works fine, but if I pass a chinese character it returns question mark(?):

Eg 1.
the word value is tree

(I put chinese character "gong1")
the word value is ?

my codepage=65001and Response.CharSet = "utf-8".

Thanks in advance,

<% @ codepage=65001 %>


Response.CharSet = "utf-8"



getword = request.querystring("word")

response.write getword


Open in new window

Question by:perfectshark
    1 Comment
    LVL 12

    Accepted Solution

    Your problem is that you right the char directly to the Address Bar.
    If you use the code bellow in IE you will see that the char is transited in URLEncode form
    so for example the
    } becomes %E3%81%BD
    › becomes %E3%86%9B
    u becomes %E3%89%B5 and so on

    so if you call the page by submitting (as bellow) the url encode will work at its own
    If you call it through ASP code then do this
    Response.Redirect "mypage.asp?word="  & Server.URLEncode("My Characters.")
    <%@Language="VBScript" codepage=65001%>
    Response.CharSet = "utf-8"
    getword = request.querystring("word")
    response.write getword
    <form  method =get >
    	<input type=text id=word name=word>
    	<input type=submit >

    Open in new window


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
    This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now