Unicode characters are not inserted in database properly

Hi all,
Iam developing an application that takes entries from text boxs and inserts them in database , When i try to write in language rather than english (i use arabic) the fields are inserted but as ?????? in the database fields , i checked the codepoints of the string and every thing is ok untill the call to executeUpdate() , i think that the unicode characters represented in the codepoint array are not transferred to the database , How can i fix this problem.
Best Regards.

In the connection string, you have to specify character encoding.
For example,
jdbc:mysql://localhost:3306/database?useUnicode=true&characterEncoding=utf8

Similar Messages

  • French characters are not correctly stored in database with SQLPlus

    Hello everyone,
    I would like to do the following:
    Run an SQL script that inserts/deletes/updates data. The data itself may be
    French or non-English characters .Currently, we do this
    by just running a script that invokes SQLPlus and runs the various SQL
    scripts. However, non-English characters are not correctly stored in the
    database (server character set is currently set to AL32UTF8).
    Is there a way to get this to work in SQLPlus?
    I have tried saving the files in UTF8 or unicode but SQLPlus cannot identify
    the formatting of the file and spits out an error.
    Any hints would be appreciated.
    Thanks,

    If the CharacterSet on server is Unicode, normally, there is no problem IF the client is using a characterset with é or à ! ;-)
    you should set NLS_LANG on client side...

  • Smartforms - Chinees characters are not displayed properly

    Hi,
    The chineese characters are not displayed propery when logged in EN in the logon screen, but we are able to see Chineese characters when logged in with ZH - chineese in the logon screen. This is happening for Sales order and Purchase order and for Japan also we fee see the same issue.
    -Regards,
    Ganesh Prasanna.T

    Hi,
    It is a printer issue. The printer needs to be configured to support the Chinese chanracter set.
    Normally when we are able to view the chinese characters properly in the print preview but not properly displayed on the output it is surely a printer problem.
    This kind of problem we faced many times.
    Regards
    Kiran Sure

  • Rows are not inserted in the order entered - Forms 4.5 to 9i database

    hi
    we are using forms 4.5 version with 9i oracle database.
    when we save a multi-record block (for eg 5 rows)
    the records are not inserted in the database in the
    order in which they are entered.
    for eg if we enter A,B,C,D,E Records and save
    on query the records appearing in the order of C,D,E
    A,B like that.
    Is there any database parameter or setting which
    effects the order of inserting rows in the database(when using forms 4.5).
    Pls inform if you have any solution.
    Thanks in advance
    cks

    This is a very common misconception.
    You should never concern yourself about the order in which rows are stored in the database. Oracle does not guarantee to return rows in any particular order so you must specify an order by clause when you select the rows.
    Without an order by clause, there are various reasons why the order of selected rows could change in different circumstances, and the order in which they are stored should be treated as irrelevant.

  • Unicode characters are shown as "question marks" in Eclipse console

    I am trying to retrieve Unicode data from Sybase database using jdbc.
    The data are stored in Sybase with unichar and univarchar datatypes.
    Following is the java code tring to run.
    {color:#808080}public class Test
    public static void main(String [] args) throws Exception
    CoreServiceSoapBindingStub binding_Core = new CoreServiceSoapBindingStub();
    CoreWSServiceLocator locator_Core = new CoreWSServiceLocator();
    binding_Core = (CoreServiceSoapBindingStub) locator_Core.getCoreService();
    Contact[] con = binding_Core.getContact();
    for(int i=0;i< con.length;++i)
    System.out.println(con.getLastName());
    }{color}
    The result of this code in Eclipse console should be as follow (consists of one English and one Japanese name).
    {color:#808080}Suzuki
    &#37428;&#26408;{color}
    However when I run this, I get the following.
    {color:#808080}Suzuki
    {color}
    The alphabetical characters seem to diplay fine in the console, but foreign characters are not....
    The default character set of the database is ISO-8859-1, but I used unichar and univarchar to store data in unicode thus believe no issue at database side...
    Used jconnect 6.05 (com.sybase.jdbc3.jdbc.SybDriver
    ) for the database driver.
    Java files are encoded in UTF-8.
    Console Encoding is UTF-8.
    Is this an issue in database driver?
    Since I set the parameters for character set to UTF-8 in both the database and java files....
    It would be great if someone could give some comments on this issue....
    Thanks a lot.

    It might be better to ask this question on an Eclipse forum. I have a couple of suggestions, but none of them have made the output in my console look entirely correct:
    1. Try to start Eclipse with these parameters: -vmargs -Dfile.encoding=UTF-8
    2. Try switching the font settings for the Console under Preferences in Eclipse.

  • Chinese characters are not displayed in the Firefox bookmarks

    Chinese characters are not displayed in the Firefox bookmarks. The name looks like e.g. "??????? ???? cn.nytimes.com"
    Chinese character of the site name is displayed ok in the head of the browser window and there is no problem reading chinese web content. I use Firefox Portable 11 /English from portableapps.com in Windows XP.
    I googled and got some tips:
    1) Set your browser to recognise Chinese language internet sites.
    Windows users: Under "Tools - Options" on your browser's menu-bar add Chinese to the languages list.
    - I did this.
    2) Set your browser's "Character Set" or "Encoding" to UTF-8 (sometimes also called Universal Alphabet or Unicode).
    Encoding settings can be changed under the "View" option in your browser's menu-bar.
    - It was already set to UTF-8.
    3) Windows users: If Chinese text still does not display correctly, East Asian language support may need to be enabled.
    - This has been done when I installed Windows.
    I still don't get any Chinese fonts in the bookmark names. I can edit the bookmark name with chinese characters and then save the bookmark, it works fine. But why does not Firefox recognize the characters when saving bookmarks? Help is appreciated.

    No I didn't change anything deep beneath the hood. My problem didn't apply to the URL, but to the name of the link or bookmark header or whatever you would like to call it. (When hitting Ctrl + D there is a Name field). I only got ???????? instead of chinese characters in the name. Also for e.g. www.cntv.cn ...but maybe all China is not in the whitelist either. ;-) But anyway, this was not the real problem for me.
    Apparently I was wrong as after a reboot of the computer it worked. The solution seemed to be to add Chinese to the language list. I don't know why it was not enough to restart Firefox?
    Now I only have problems to show chinese characters in the name field of my external link manager... But I guess it is not an issue for Mozilla.

  • CJK characters are not converted correctly to PDF

    We are developing layout using SMARTFORMS. We are using standard function module 'CONVERT_OTFSPOOLJOB_2_PDF'  to convert the SMARTFORM to PDF. Chinese, Japanese, Korean characters are not displayed/Converted correctly in PDF documents. But in Spool these characters are showing correctly.
    Whereas German, Italian, French are displaying and printing correctly and converting properly to PDF.Please suggest a suitable
    note/correction for the above.

    Hello dear,
    Did you got a solution for this? Even i am facing the smae problem.
    Warm regards,
    Harshad.

  • Special characters are not shown in compare document report in Acrobat X

    Hi All,
    I have a pdf document which is having some special characters like üὄ. Now I have updated the document with few corrections and while compare document in Acrobat X special characters are not shown in the report.
    Can any one please look into this and give suggestion.

    Hi Steve,
    Thanks for your reply.
    Platform - PC
    Application - 3B2 and Acrobat 9
    So far we have seen this kind of issue in only one document. In the below screenshot you can see 2 pdf files, the right side one is my MS pdf and the left side one is the exported pdf from 3B2 application both the files having the special characters such as . I just did the text comparison however both   and  is missing in the exported pdf but the reports shown the changes for  characters only wherever the  charactes is missing the report not shown the changes properly(See highlighted in yellow).
    Please let me know if you need more deatails.

  • Spanish accent characters are not displayed proper in excel file

    Hi
    I have written a program which displays one report file (.xls file ) on the browser.
    This report file is in spanish language and contains few accent characters like
    ("� � � � � � �"). These characters are not displyed properly in that excel file which is opened in the browser. I have used utf-8 encoding method. I tried with some other encoding methods available. But still this problem continues.
    Kindly provide me help as soon as possible.
    Thanks and
    Regards,
    Deval

    File is generated through a java bean at runtime and it is not stored pgysically.
    If I copy these characters from somewhere to new xls file then it will be displayed properly.
    Sample code which is used for setting headers is as below:
         protected void setContentType (
              HttpServletResponse     p_response
         ,     InstanceData          p_instancedata
              p_response.setHeader ("Cache-Control", "no-cache");
              p_response.setHeader ("Cache-Control", "max-age=0");
              p_response.setHeader (
                   "Content-Disposition", "inline; filename="
              +      p_instancedata.userId
              +      "_"
              +      System.currentTimeMillis ()
              +     ".csv"
              System.out.println("Content generator = ");
              p_response.setHeader("charset","utf-8");
              p_response.setContentType (EXCEL_CONTENT_TYPE);
    For generating this xls file, format of data is XML. Means both request and response data will be in XML format.
    Hope this information help in suggesting any solution for this problem.
    Regards,
    Deval

  • Reg:special characters are not priniting while selecting the CS language

    Hi All,
    When I am trying to print in CS language some special characters are not printing.
    Even when I was trying to create the entries in TTDGT table ,these special characters are not created
    ( příkazu) here r & i are the special characters. instead of special characters simply r and i were created .
    Could you please advice me on this how to resolve this .
    Regards,
    S.chaitanya.

    Hello Chaitu,
    I think you are working on scripts and trying to create the Script in different language?
    However, try to copy the text in CS and paste it in STandard Text. If it is not displaying properly then Try to log in to the same language and try to paste that Text in the STanard text So10. If it appears properly then your issue is fixed.
    Please let me know if the issue is while printing the Script form, i mean are you able to view it properly in the Print preview...?
    If this is the issue then it is not an issue at your end user needs to check whether his printer is supporting their langauge or not.
    Also check with the related language package . for ex I had worked on the Script form and tried to convert it into chinese i faced the same issue so when i checked with the System Admin he installed Asian Langauge Package in my system. After that I was able to convert the script into Chinese properly.
    Hope this will be helpful..
    Regards,
    Kittu

  • Non-whitespace characters are not allowed ...

    I'm trying to parse the following XML fragment into a DOM Document object:
    <CNetSpecs><section name="General
    "><spec name="Printer Type
    ">Personal printer - ink-jet - colour
    </spec><spec name="Weight
    ">6.4 kg
    </spec></section><section name="Printer
    "><spec name="Print Speed
    ">Up to 15 ppm - black draft ? Up to 15 ppm - colour draft ? Up to 0.65 min/page - photo best - 101.6 x 152.4 mm ? Up to 1.28 min/page - photo best - 203 x 254 mm
    </spec><spec name="Built-in Devices
    ">Preview screen
    </spec><spec name="Max Resolution ( B&W )
    ">5760 dpi x 1440 dpi
    </spec><spec name="Max Resolution ( Colour )
    ">5760 dpi x 1440 dpi
    </spec></section><section name="Software / System Requirements
    "><spec name="OS Required
    ">Microsoft Windows 98 Second Edition / Windows ME, Apple MacOS X 10.1, Apple MacOS X 10.2, Microsoft Windows 2000 / XP, Apple MacOS 8.6 - 9.2
    </spec></section></CNetSpecs>The fragment is pulled out of a text field in a database.
    The code I'm using to do the parseing is:
    // Parse the CNet XML into a proper doc.
    DOMParser parser = new DOMParser();
    parser.parse(new InputSource(new StringReader(cnetSpecs)));
    org.w3c.dom.Document cnetXml = parser.getDocument();
    xmlUtil.toFile(cnetXml, "/tmp/cnetxml.xml");
    NodeList cnetRoot = cnetXml.getElementsByTagName("CNetSpecs");
    Node CNetStatsNode = xml.importNode(cnetRoot.item(0), true);
    root.appendChild(CNetStatsNode);and I get the following errors:
    [Error] :1:107: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'Personal printer - ink-jet - colour'.
    [Error] :1:150: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw '6.4 kg'.
    [Error] :1:391: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'Up to 15 ppm - black draft ? Up to 15 ppm - colour draft ? Up to 0.65 min/page - photo best - 101.6 x 152.4 mm ? Up to 1.28 min/page - photo best - 203 x 254 mm'.
    [Error] :1:452: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'Preview screen'.
    [Error] :1:528: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw '5760 dpi x 1440 dpi'.
    [Error] :1:603: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw '5760 dpi x 1440 dpi'.
    [Error] :1:847: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'Microsoft Windows 98 Second Edition / Windows ME, Apple MacOS X 10.1, Apple MacOS X 10.2, Microsoft Windows 2000 / XP, Apple MacOS 8.6 - 9.2'.Can anyone point me in the right direction? I've been scratching my head all day.

    I dont think so that it is because of un-escaped "&" character or breaking line sequences.
    As in mine case it is giving for XML as below:
    <?xml version="1.0" encoding="UTF-8"?>
    <publicationManifest date="03/13/2007 14:06:25">
    <contentItem action="add" expireDate="" releaseDate="" revision="1">
    <content>This would go under webstore</content>
    <metadata>This would go for Database</metadata>
    </contentItem>
    </publicationManifest>
    and console output at java IDE is
    [Error] item-manifest_Test.xml:4:46: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'This would go under webstore'.
    [Error] item-manifest_Test.xml:5:45: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'This would go for Database'.
    Therefore , if anyone had found the root cause of this discrepancy please update this topic.

  • Polish characters are not retrived from request object

    Hi
    I have a problem in passing POLISH character through request object.
    I am calling a servlet from a jsp with a hyper link. when the link in jsp is clicked the following code will be executed
    response.sendRedirect(response.encodeURL("http://hostname:8080/appName/abc.do?method=getReport&FirstName=Ko�tun&LastName=Pro�ciak"));
    this code is passing two POLISH strings First Name & Last Name to the servlet.
    In the servlet i am trying to retrieve the values of the parameters "FirstName" & "LastName".
    Sring FN=request.getParameter("FirstName");
    String LN=request.getParameter("LastName");
    The variable FN & LN doesn't show the POLISH character in servlet.
    I tried with the below option in JSP
    <meta content="text/html; charset=ISO-8859-2" > (or)
    <meta content="text/html; charset=UTF-8" >
    (or)
    <%@ page contentType="text/html;charset=ISO8859_2" %>
    (or)
    <%@ page contentType="text/html;charset=UTF-8" %>
    In Servlet i tried using
    request.setCharacterEncoding("ISO-8859-2");
    (or)
    request.setCharacterEncoding("UTF-8");
    Pl help me.
    Thanks in advance

    Don't do it then. Those characters are not allowed inside a URL and have to be encoded. You know, that %... stuff.

  • Text fields populated from lov mapping are not saved to database

    Hi Everyone,
    I'm having a wierd problem. My requirement is to autopopulate two text fields field 2 and field 3 when a value is selected from lov in field1 and save all the values to database on click of a submit button.
    Using lov mapping i'm able to populate field 2 and field 3 with corresponding values based on the value selected in field1. And also field2 and field3 should be in the readonly mode so that user cannot change the value.
    So to make the fields readonly i have changed the property of readonly to true for field2 and field3. But if I change the readonly property, the values for field2 and field3 are not being saved to database.
    The values are getting saved to database only when readonly = true for messageTextInput item type or if the item type is a form value.
    I also tried disable = true, which also didnt work.
    I tried to debug by writing some sop statements in PFR, but these statements also returned null for pageContext.getParameter("field2") etc;
    Can anyone please tell me how to solve this problem?
    Thanks
    Sunny

    Hi Gyan,
    I forgot to mention that , I also tried messageStyledText. Which also didn't work. I wanted to use vo.setAttribute as my last option, but i wanted to understand why the values are not saved to database when the text item is showing the values on the page.
    Thanks
    Sunny

  • Created a trigger but new values are not inserting in the backup table

    I have created a backup table and writter a trigger on a table such that after update old values and new values are to be inserted into the backup table, but new values are not inserting. I am giving the code please help me
    create or replace trigger "SUPPQUOTES_AUDIT"
    after update or delete on phsuppquotes for each row
    begin
    insert into phquotes_audit(cprc_new,suppcode,itemcode,cprc_old,negodt,validdt,userid,TRANDATE) values
    (:new.cprc,:old.suppcode,:old.itemcode,:old.cprc,:old.negodt,:old.validdt,:old.userid,SYSDATE);
    end;

    old values and new
    values are to be inserted into the backup table, butwell you have only one insert there, inserting old values with a new id (which is ok if you don't update the id column, but I don't think that :new is available for deleting ops); you should have two inserts:
    insert into
    phquotes_audit(cprc_new,suppcode,itemcode,cprc_old,negodt,validdt,userid,TRANDATE) values (:old.cprc,:old.suppcode,:old.itemcode,:old.cprc,:old.negodt,:old.validdt,:old.userid,SYSDATE);
    if (updating) then
    insert into phquotes_audit(cprc_new,suppcode,itemcode,cprc_old,negodt,validdt,userid,TRANDATE) values (:new.cprc,:new.suppcode,:new.itemcode,:new.cprc,:new.negodt,:new.validdt,:new.userid,SYSDATE);
    end if;
    gojko adzic
    http://gojko.net

  • Output File : German Characters are not coming

    Hi All,
    In my output file german characters are not showing. All the german Symbols are coming as '?'.
    Is there any way to get that?
    Regards,
    Sridhar

    Hi,
    Change the encoding in your File adapter to <b>ISO-8859-1</b>
    In the receiver file adapter --> File Encoding.
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    Regards,
    Bhavesh

Maybe you are looking for