How can I store Chinese Character in MSSQL Server 2000 from JSP?

Dear all,
I've got a problem with storing Chinese Characters in MSSQL table. The list below is my setting of my project:
HTML/JSP -- "charset=big5" (in both "meta" and "import page")
MSSQL server -- The field of storing Chinese Characters are in nvarchar format
But the Chinese Characters are converted into some unknown codes and what I could do to make sure the transaction can go smoothly? Can anyone give me a hand on this issue??
Van

the key point is yousing the connection string in the following way ;-) it works for me in Hebrew.
Class.forName("org.gjt.mm.mysql.Driver");
//"?useUnicode=true&characterEncoding=UTF8
Connection con = DriverManager.getConnection ("jdbc:mysql://localhost:3306/database?useUnicode=true&characterEncoding=UTF8","user_name","password");
SAMPLE PAGE
<%@ page contentType="text/html; charset=UTF-8" %>
<%
// response.setCharacterEncoding("UTF8");
// request.setCharacterEncoding("UTF8");
%>
<%@taglib prefix="bean" uri="/WEB-INF/struts-bean.tld"%>
<%@ page import="java.sql.*,
java.util.Properties,
java.util.ResourceBundle,
java.util.Locale,
java.io.*"%>
<head>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="TEXT/HTML; CHARSET=UTF-8">
<LINK REL="stylesheet" TYPE="text/css" HREF="/portal/style/text.css">
</head>
<body dir="rtl">
<span class="redText">
&#1513;&#1502;&#1493;&#1514;:
</span> <br>
<%
if ("true".equals(request.getParameter("insert"))){
String text = request.getParameter("text");
if(!"".equals(text))
Class.forName("org.gjt.mm.mysql.Driver");
Connection con2 = DriverManager.getConnection ("jdbc:mysql://localhost:3306/zoozoo?useUnicode=true&characterEncoding=UTF8","moshe_beeri","navctrh");
Statement stmt2 = con2.createStatement();
//text="&#1513;&#1500;&#1493;&#1501;";
String dada="insert into testheb (name) values ('" + text + "')";
// String ins = new String(dada.getBytes("iso-8859-1"),"windows-1255");
stmt2.executeUpdate(dada);
Class.forName("org.gjt.mm.mysql.Driver"); //"?useUnicode=true&characterEncoding=UTF8
Connection con = DriverManager.getConnection ("jdbc:mysql://localhost:3306/database?useUnicode=true&characterEncoding=UTF8","user_name","password");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("select * from testheb"); // create a table for testings with id,name
while (rs.next()){
String text = rs.getString("name");
%>
<%=text%> <br>
<%
%>
<hr>
<form method="post" action="tespmysql.jsp">
<input type="hidden" name="insert" value="true">
<input type="text" name="text">
<input type="submit">
</form>
</body>

Similar Messages

  • How can I store a 20 minute video to iCloud from iMovie?  I have room on iCloud.

    How can I store a 20 minute video to iCloud from iMovie?  I have room on iCloud.

    iMovie (2013): Set up “iMovie” Theater and iCloud
    You'll need to upgrade your OS and iMovie version first.

  • How can i upload a image file to server by using jsp or servlet.

    Hi,
    I m gurumoorthy. how can i upload a image file to server by using jsp or servlet without using third party API. pls anyone send me atleast outline of the source code.
    Pls send me anyone.
    Regards,
    Gurumoorthy.

    I'm not an applet programmer so I can't give you much advice there.
    If you want to stream the file from the server before it's entirely uploaded, then I don't believe you can treat it like a normal file. If you're just wanting to throw it up there and then listen to it, then you can treat it like a normal file.
    But again, I'm not entirely certain. You might be able to stream the start of the file from the server while you're still uploading the end of it, but it probably depends on what method you're using to do the transfer.

  • How can I display Chinese Character correctly in JSP

    <p>Dear Expert,</p><p>Now I develop web application which using CR report, the development tool is IBM RAD(rational) and the database is DB2 UTF-8. Because need user to input something in JSP, so the programmer use "GB2312" to convert to insert into the database. But when I create the crystal report and view in the web, the Chinese character can&#39;t disply correctly, like "???????", even I formated the font in report, doesn&#39;t work too.</p><p>And I set the report JSP charset to "GB2312" or "UTF-8", both of them failed. Following is my JSP seting:</p><p><%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%%></p><p>or <%@ page language="java" contentType="text/html;charset=GB2312" pageEncoding="GB2312"%%></p><p>And I think I must convert the data from database site firstly, then display, but I don&#39;t know where I can coding it and how to coding? Could any one tell me how to get it? </p><p>I use RAD(Rational) as development tools.</p><p>Thanks so much for your any comments. Many thanks!</p><p>Steven</p>

    <p>Hi Steven,</p><p>         It sounds like you are on the right track to get the Chinese data to appear up correctly in the report. Can you tell me if you are using the JSF viewer or the JSP viewer?</p><p>From what the developers are telling me the following should work:</p><p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; color: navy; font-family: Arial">For JSP viewers to set  content type correctly you can either use</span></font></p> <p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; color: navy; font-family: Arial"><%@ page  contentType="text/html;charset=UTF-8" %></span></font></p> <p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; color: navy; font-family: Arial">Or</span></font></p> <p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; color: navy; font-family: Arial">response.setContentType("text/html;charset=UTF-8âu20AC)</span></font></p> <p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; color: navy; font-family: Arial">or  </span></font></p> <p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; color: navy; font-family: Arial">simply call  viewer.setOwnPage(true); if it not necessary to blend with other  pages.</span></font></p> <p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; color: navy; font-family: Arial"> </span></font></p> <p class="MsoNormal"><font face="Arial" size="2" color="navy"><span style="font-size: 10pt; color: navy; font-family: Arial">For JSF viewer the  third option is not available.</span></font></p><p class="MsoNormal">What does your JSP page code look like? Also, what does the output look like?</p><p>Finally, one last thing is to ensure that the font you are using in the report is available to the engine at runtime. This will mean that it wll need to be installed on the application server where your JSP page is running. Give this a try and let me know what you find. </p><p>Regards,<br/>Sean Johnson (CR4E Product Manager) <br/><br/> Rate this plugin @ Eclipse Plugin Central          </p>

  • How can show the Chinese character in Oracle Report Graph on RedHat Linux?

    The OS is RedHat Linux and I set NLS="SIMPLIED CHINESE_CHINA.ZHS16GBK" in %ORA_AS_HOME%/bin/reports.sh
    The report file is a JSP Web Report, including Chinese character in web HTML text and graph.
    Now Chinese character in HTML text can be displayed correctly but the Chinese character in graph can not be display.
    Anybody can help me? thanks a lot.

    The report server is 9i and it is running in Oracle AS 904.
    And set NLS_LANG="SIMPLIED CHINESE_CHINA.ZHS16GBK" in %ORA_AS_HOME%/bin/reports.sh

  • How can i display chinese character in asp?

    ---windows2003
    ---iis6.0
    ---oracle92010
    ---oo4o
    oracle character set is we8mswin1252
    sqlplus display chinese character normally.
    when i export the oracle table into microsoft excel,the excel can display chinese character normally.
    but when i write code in asp.The IE can not display the chinese character?
    who would tell my why?
    Message was edited by:
    user525971

    Hi,
    here's a link to the SQL Developer forum: SQL Developer
    Frank

  • DSO content can't display Chinese character

    Hello experts,
    I extract data from non-sap system (non-unicode) to BW DSO (7.0 unicode).
    The DTP, data extraction and the activation all work fine.
    However, the content of the DSO can't display the Chinese character.
    Is there any setting I miss?
    How can it display Chinese character as the data in source system?
    Any information is very appreciated.
    Thanks in advance.

    Hi,
    Make sure Chinese Language Patch applied on BW system. You can see Chinese does not mean Chinese Language Patch applied.
    However, even if Language Patch is not applied, you still can see Chinese in reports via Portal.
    Good luck
    Jonas

  • How can I store all my notebook documents from iPad?

    How can I store all my notebook done documents updated from iPad or iPhone ?

    A simple and popular way to copy files.  Also, has shared folders.
    http://wiki.dropbox.com
    More ways to transfer files and access Word documents:
    https://discussions.apple.com/thread/4044866?tstart=0
    Other more complicated ideas
    Look in the app store for accessing Windows File servers.
    for example:
    http://itunes.apple.com/us/app/filebrowser-access-files-on/id364738545?mt=8
    Configure WebDave on your server.
    This thread has good info.
    https://discussions.apple.com/thread/3708341?tstart=0
    How to transfer files from your iPad to your PC with iPad to Computer Transfer
    http://www.iphone-mac.com/how-to-transfer-and-sync-contents-from-ipad-to-pc.html

  • HT4847 How can I store files on iCloud?

    How can I store files on iCloud?

    Actually, I have found that this is very possible, combining several other tips from around the web, though perhaps not easy.  I am using Moutain Lion.  I am assuming that you have already activated and signed into iCloud previously.  Here are the steps for creating a cloud storage location that you can drage any file into, and access from any of your Macs:
    1) Create a new folder in the directory that is synced with iCloud.  Start by opening a Finder window, and going to the ~/Library/ directory.  Do this by typing Shift-Command-G while the Finder is open, and typing ~/Library in the goto window.  Next, open the directory "Mobile Documents".  Finally, Control-Click inside the Finder and select the "New Folder" option, naming it whatever you like -- I chose "iCloud".
    2) Step two is about creating a shortcut to this iCloud folder in the Finder.  You cannot directly drag the iCloud folder into the Favorites section of the Finder, but you can do this:  Control-Click on your new folder, and select "Make Alias".  Now, drag this alias over to your Favories panel in the finder.  You will be prompted whether you really want to move the Alias out of iCloud: Say "Yes".  Now, delete the Alias -- you don't need the original instance of it any more. (Alternatively, you can skip to the end of step 3 and drag the symbolic link into the Finder Favorites)
    3) Step three is about being able to access this iCloud folder from the Unix command line, and from the Desktop GUI.  Open a Terminal window (Launchpad => Other => Terminal).  By the way, I recommend putting the Terminal into your Taskbar, if it isn't already.  You should be in your home directory ... to verify, type "cd" and press Enter.  Now, create a Unix symbolic link (an Alias won't work for this) to the actual location of the iCloud folder:
    Type "ln -s ~/Library/Mobile\ Documents/iCloud/ iCloud" and press enter.  The command should be entered precisely, I recommend cut and paste.  The first character is a lower case "L" and there is a space after the backslash between "Mobile" and "Documents".  You should now have a symbolic link to the iCloud folder created.  To view it in the Finder, go to your home directory: Shift-Command-G, and then enter "~/" into the window.  You should see a folder called "iCloud" there, with a little arrow animation in the corner.  You can drag this into the Taskbar to have a permanent clickable shortcut.  You can also access the contents of this folder through the terminal.  From your home directory, just type "cd iCloud" and press Enter.  You are now in the iCloud folder (or more properly, your local version of it), and can use the usual Unix tricks ... "ls" to list contents, "mkdir ABCD" to make a new directory called "ABCD", "mv a.txt b.txt" to rename a file "a.txt" into "b.txt", etc.
    4) Step four is about accessing this folder on other machines.  On a second Mac, repeat all of the steps above *EXCEPT* for creating the New Folder in step 1 ... it already exists, but you can get it into your finder bar, and create sym-links in the same way from there.
    The great thing about this is that when you work, you are editing a *local* copy of the file, so you can work offline if you like.  Then, whenever you have internet access, the *actual remote* cloud copy of any new or modified files is uploaded.  Likewise, updated files are downloaded from the cloud to get your local files into sync.  You have the benefit/safety of a local hard copy, AND the portability (and extra safety) of cloud storage.  It's exactly what I wanted, and it works like a dream.  Plus, time machine can back up your *local* copies, to maintain version history.  I'm not quite sure what happens if you try to simultaneously edit a file from two places, but don't do that.
    Hope that helps you!
    JWSpaceman

  • How can i set the character set ???

    hello
    now i have the following
    Message msg =
    new MimeMessage(Session.getDefaultInstance(props, null));
    how can i set the character set to be 'windows-1256'
    pleaze help if u can
    thanks very much
    Belal

    You have to deal with the NLS_LANG environment variable,it is defined as NLS_LANG=<Language>_<Territory>.<clients characterset> .
    Where is your oracle client installed? On the the server machine, where the database resides , on another Unix system or is it a Windows client? On Windows NLS_LANG is directly related to the OS settings and stored in the registry, on Unix NLS_LANG is not set automatically and defaults (if not set) to AMERICAN_AMERICA.US7ASCII. If you are working on UNIX, this could be the reason for disordering. I'm not familiar with Chinese, so I don't know the correct setting , but a good approach would be same setting as on the server.
    Metalink note 158577.1 describes NLS_LANG very detailed.

  • How can i store data in term of a tree structure

    how can i store data in term of a tree structure

    What a tree is the question. If you just want a fast access, ehats about Hashtable or dictionary classes ? The data there is structured in a tree. For a simple binary tree, you can use something like
    class Node {
    Node(Object data){
       Node left;
       Node right;
       Object data = data;
    void insert(Object data, Node parent){
      int test = data.compareTo(parent.data);
      if(test < 0 ){
        if(parent.left == null){
          parent.left = new Node(data);
        else{
          insert(data, parent.left);
      else{
        if(parent.right == null){
          parent.right = new Node(data);
        else{
          insert(data,parent.right);
    }And so build up a binary tree. The traversing methods can be found in almost any good book (pre-order, post-order, in-order), for search you have just to look at greater/smaller and descend in the tree.
    The Object data can be changed to what you want for storage, String, or primitive Numbers, Vectors ...
    Is that what you search for?

  • How can I store my iTunes library on an NAS (Fritz Box)?

    How can I store my iTunes library on an NAS (Fritz Box)?

    1. Drag the library to the external drive, launch iTunes with the Option key held down, click on Choose Library, and point it there.
    2. Get a second. Having the backups on the same drive as the original data won't help when that drive fails.
    (66929)

  • How can i add Chinese language support to my N97

    Hi all of you!!
    i hope can some body help me
    i work in china and i bought my mobile from Dubai and it is just support Arabic and English
    so how can i add chinese support to my mobile?? i don`t want change product code beause i want arabic languge also
    just can review chinese websites and read chinese messages is enough, i know can throw change the the font but.....
    http://forum.dailymobile.se/index.php?PHPSESSID=m6​1ggc373rem98jjmbbnri56r4&topic=15893.0
    i already try above subject but the font is very ugly and make problems for my mobile and switch off by it is self many times
    before i have Nokia N82 and i was install Psiloc Crystal Chinese on it and by this program can read and write chinese but until now no have such program for N97
    so how can one mobile same N97 (small laptop) not support some languages????
    and how can one company same NOKIA don`t give such this serveice for the customers,
    need charge is okbut need some thing usefull
    thanks all and i hope can find some body help me

    Dear I know that you answer me but it is not Solution, right or no? waiting for another
    also why it is impossible with out third-party software? change mobile font can!!!!
    did you visit this link http://forum.dailymobile.se/index.php?PHPSESSID=m6​1ggc373rem98jjmbbnri56r4&topic=15893.0
    i try it but have some mistakes, but can support chinese and arabic in same time
    also you speak as third-party software full the market and internet
    give me one third-party software name and i will be very happy
    Dear i love nokia and i will not change nokia to others but i can see around me such as IPhone, it is support most of languages together,
    thank you any way, now i know nokia support discussions is useless
    拜拜

  • How can I increase the character limit of my text messages for Droid Maxx 4.4?

    How can I increase the character limit of my text messages for Droid Maxx 4.4?

    Send as a MMS.

  • How can I store received email in a folder on my iPad *

    How can I store received email in a folder on my iPad *
    I am trying to save certain messages on my iPad but don't know how to make a folder with email!

    You can only add folders to the email account if it is an IMAP account. If you see an EDIT button at the top of the window when you are in the email account - where you can see your inbox, sent and trash folders - if there is an edit button at the top of that window - you can tap that and then an Add Mailbox option appears at the bottom of the window.
    If you do not see that edit button, you do not have an IMAP account and you cannot add folders.

Maybe you are looking for

  • Can you switch off continuous play?

    I have an iphone 5. When playing songs is it possible to stop it automatically playing the next track?? I don't want to have to put each track into a different playlist. I'd just like to play one and then when it's finished I can then press play on t

  • Google Voice not working in Blackberry Bold 9700

    I am using blackberry bold 9700  with the OS version  5.0.0.714; I have downloaded google voice and its not working, let me give the details: 1) It can sign-in and also detects my goog voice number (while sign-in used gmail id to login) 2) Cannot sen

  • Source codes of the Unix commands

    It is still me, in spite of my bad English, I hope that you would understand my question. In fact, I am with the research of the place where I could find the source codes of the various commands of the Unix(sunSolaris) environment. Thank you . Patric

  • What do I do to get Reader for a Mac?

    I bought the $199 version of Adobe XL but when I downloaded it was an .exe file.  As a mac user I need a .dmg file.  Any ideas on how to best correct this? 

  • Oracle Service Bus "ThreadPool has stuck threads"

    Hi all, I have JMS Proxy service that listen to the queue, with small quantity of message every second, it works great. But after put message with bigger quantity and faster insertion on queue, the proxy service cannot pull the message anymore, the e