Some correct, some incorrect

Dear Friends,
I am trying to display japanese characters on browsers. I am using MySql and JSP. I am able to display japanese characters from database. But some katakana and kanji characters are not displayed correctly. Actually they are not stored correctly in database.
I have set the character encoding of database to SJIS.
I have also set the content-type to SJIS in JSP in <%@ page %> tag.
While reading data from the database, I use following line:
new String( str.getBytes(), "SJIS" ), where str = string received from database
When storing data into the database, I dont do anything. I just store data as it is.
Can anybody put light on why only some katakana and kanji characters are not stored correctly in database. I dont know why this happens. Please guide me on this.
Thanks to all
gaurang.

I too am facing the same problem. I am using UTF-8 format for input and display. Data prior to insertion is fine. But data after insertion becomes ?? for certain characters. Have I missed out anything?
Environment: JDK1.4, Tomcat 4.0.3, Access2K, using chinese as sample data
+++++++++++++++++++++++++++++++++++++++++++
<%@ page contentType="text/html; charset=utf-8" %>
<%request.setCharacterEncoding("utf-8");%>
//----------- Storing ---------------
// store as utf-8 in database
String data = request.getParameter("data");
try {
byte by[] = data.getBytes("utf-8");
String UTF8Str = new String(by);
PreparedStatement ps = dbConn.prepareStatement("INSERT INTO MBTest VALUES(?)");
ps.setString(1,UTF8Str);
ps.execute();
//---------- Retrieving ---------------
// read unicode characters from database
ps=dbConn.prepareStatement("SELECT uText FROM MBTest");
rs=ps.executeQuery();
while( rs.next() ) {
String uName = rs.getString("uText");
uName = new String(uName.getBytes() ,"utf-8");
out.println(uName + "<BR>");

Similar Messages

  • [SOLVED] urxvt doesn't display correctly some special characters

    Hello everyone,
    I have a weird issue with urxvt. For some reason it doesn't display correctly some special character.
    Here is a comparison between xfce4-terminal and rxvt-unicode  (I used theses characters as exemple):
    xfce4-terminal :
    urxvt :
    And here is my .XDefaults file (without the color and the plugin part, since it's unrelevant):
    !Font
    URxvt.font: xft:PragmataPro:pixelsize=11:antialias=false
    !General
    URxvt.scrollBar: false
    URxvt*imLocale: fr_CH.UTF-8
    URxvt.saveLines: 5000
    URxvt.geometry: 95x26+50+50
    Has someone an idea what the problem could be?
    Thank's in advance.
    Last edited by mwm (2013-11-13 13:15:48)

    This is what I think is happpening.
    PragmataPro may not contain those glyphs.  It appears to have a wide array of glyphs but it is not unicode complete.
    Xfce-terminal is a vte terminal.  When a glyph cannot be found in the desired font, it will find the glyph in the 'closest' font.  Urxvt will only use the glyphs in the font or fonts specified.  If PragmataPro does not contain the glyphs, urxvt will display boxes.
    You can give urxvt a series of fonts to search. It will search for a glyph through the listed fonts in the order you specify.  Here's an example from my urxvt configs:
    urxvt*font: xft:DejaVu Sans Mono:style=Book:antialias=false:size=8, \
    xft:WenQuanYi Bitmap Song:size=8, \
    xft:FreeSerif:style=Regular, \
    xft:unifont:style=Medium:antialias=false
    I couldn't use FreeSerif or unifont as a main font, but for an occasional glyph, it works for me.  This file, http://www.cl.cam.ac.uk/~mgk25/ucs/exam … 8-demo.txt, can be displayed in urxvt correctly, with only a few unknow glyphs showing as boxes in the Amharic section.

  • How do i get to he commentary option in order to make some corrections in a doc ?

    i'm with an open pdf and i can't find the comentary button  where can I find that option?

    thank you ! so I have to open it in adobe reader???
    2014-06-17 15:24 GMT-03:00 bob.treitman <[email protected]>:
        how do i get to he commentary option in order to make some
    corrections in a doc ?  created by bob.treitman
    <https://forums.adobe.com/people/bob.treitman> in *Workspaces.Acrobat.com
    <http://Workspaces.Acrobat.com>* - View the full discussion
    <https://forums.adobe.com/message/6466042#6466042>

  • Some corrections lost on save with Unicode font

    Hi,
    Has anyone had this problem? I have been working on a 300 page document using a Tibetan font as well as English for over a year now and we are on the final corrections. The editor mentioned that I seemed to be only half correcting some of the wrongly typed Tibetan words, which I thought odd. In order to correct a few letters in Tibetan I first highlight, then re-type and then I always save, as one does. If the word is still highlighted when I save (i.e. I have not clicked elsewhere on the page) then there is a chance that part of the corrections are not saved - I saw one of the letters disappear in front of my eyes! This must be a bug, surely?
    It does not occur with English, only in Tibetan (in my experience, I have not tried other languages) and only it seems when I am typing a 'stack', i.e. one letter on top of the other, and then, if the highlight is still showing (it is yellow in this case not the usual blue) when I go to save, one of the letters disappears. If I go on to type more letters then the highlight disappears and there is no problem. I expect you can imagine the sense of frustration I feel that the editor and I have doubtless been continually repeating corrections throughout the document!
    And while on the subject of saving, I cannot save in Pages 3 - and could not in Pages 2 either - using the command+S shortkey, which naturally works in every other program on my computer. It takes extra time and effort to have to save from the file menu each time. Does anyone have any suggestions why this is the case?
    Best wishes
    Ynys

    Yvan wrote:
    Which keyboard layout are you using when you type in Tibetan?
    I toggle between XenoType Tibetan and Wylie from Chris Walker at http://www.tibetanportal.com/#keyboards. That means I can sometimes use both within a single word.
    The save oddity may be linked to a "special" keyboard layout.
    If you already own an application allowing us to link shortcuts to a script, I would be able to write an AppleScript whose task would be to save the frontmost document without using the cmd S shortcut.
    I don't understand what you mean. I would actually prefer to do Command+S because then I would not be taking my eyes off the word, which is what has been happening I think, or I would surely have noticed earlier what was happening.
    Ynys

  • 2 part question about insipre 6600.....please give some me some advice.

    Ok my first question is:
    I need to find a place to purchase the cables that go from the subwoofer to the PC sound card. It is a set of 3 cables, the ones that are color coded, green, black, and orange. I just went to hook up my speakers again and have realized that i am missing the those cables
    2nd question.
    I would also like to hook these speakers up to my laptop. My laptop is a Acer Inspire 5520-589. The Laptop does have a spdif out and i do beleive that the sound card supports dolby digital. So if i can get Digital sound from the laptop to the speakers somehow that would be great. If not, then no big deal.
    If i can only get stereo sound from my laptop to the speakers that is fine also. But, what kind of adapter would i need. I would need to get the 3 3/8" jacks (green, black, orange) from the speakers to the single 3/8" headphone out jack of my laptop, that would be great to.
    I was thinking that i could just use headphone splitters, but if i recall correctly some of the cables from the speakers are triple ringed as opposed to a double ring on a stereo headphone jack. I can't check the cables cause i need to find a place to purchase them (hence the 1st question).
    Please some advice would be appreciated.

    DeathGrind wrote:
    Ok my first question is:
    I need to find a place to purchase the cables that go from the subwoofer to the PC sound card. It is a set of 3 cables, the ones that are color coded, green, black, and orange. I just went to hook up my speakers again and have realized that i am missing the those cables
    just google for it...they are lots of such cable. you basically need 2 stereo cable and triple ringed cable as you have mention in your post.
    for the other qns...i suggest you go get a proper soundcard to match that 6.1 speaker instead.

  • Is there a way customize the community Notifications, some instant, some daily/weekly summaries?

    Is there a way customize the community Notifications, some instant, some daily/weekly summaries? I need some of the discussions emailed to me instantly, while others, the threads that take a while for Apple to correct, are needed in a daily summary and/or a weekly summary. Is there a place to do this or do I have to create rules in Mail ?
    Thanks in advance.

    Not that I know of, however it's not a bad suggestion. I'd recommend posting to www.apple.com/feedback. Don't expect to hear back though.

  • Some pictures in I-Photo seem to be corrupted. When I click on them, the photo comes up for a second, then the picture turns black with a white fuzzy circle inside it and what looks like an explanation mark. Some older, some newer,  no common thread.

    Some pictures in I-Photo seem to be corrupted. When I click on them, they come up for a second, then turn black with a white circle in the middle and what looks like an explanation mark. There does not seem to be any rhyme or reason to the photos that are a problem, some older ones, some newer, some albums have none, some albums have a lot.
    Thanks,
    Mark

    time to time (when I have a chance), I will go to Finder, bring up ALL Images and start going through them to label them (before I put a label on them, they are simply listed as 123 jpg, 124 jpg etc.).
    You're damaging the Library doing that, and that's the cause of your problem.
    Never, ever, ever use the  All Images search and work on items in yoyr iPhoto Library. They must only be accessed via the iPhoto window.
    Restroe from abck up or try rebuild the Library:
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
    Next: You need to learn how to use iPhoto. There's no need to be dragging things to the desktop:
    For help accessing your photos in iPhoto see this user tip:
    https://discussions.apple.com/docs/DOC-4491

  • I use to have a iTunes account with my old computer, and I have lost all my iTunes music, some purchased, some downloaded from another source. Now I'm using a brand new computer (Windows) and I have opened a NEW iTunes account, but I need my music back...

    I use to have a iTunes account with my old computer, and I have lost all my iTunes music, some purchased, some downloaded from another source. Now I'm using a brand new computer (Windows) and I have opened a NEW iTunes account, but I now I need to figure out if it is possible to recoup my music content that I originally had. I had, I believe around close to 300 songs on my account ;(......Any help or guidance would be greatly appreciated.
    Thanks Again, Ronald
    <Email Edited By Host>

    ronaldkerr24 wrote:
    Now I'm using a brand new computer (Windows) and I have opened a NEW iTunes account
    Now remove all your info and update the old AppleiD/iTunes account and use only that account.
    You cannot transfer items between iTunes accounts.
    You can redownload all the content.

  • HT1688 need help, i backed up my iphone 5 to my pc and for some reason, some of my old photo albums sync back into my iphone, these are photos that i do not wish to have on my phone, i think i need someone to help me reset my itunes settings,

    Hi as I have listed above, I backed up my iphone5 to my pc and for some reason, some of my very old photos from my itunes account sync to my iphone, theres no way for me to delete them i've already try.  These are photos that i do not wish to have in my phone, pleas if someone can contact me and help walk me thur this mess i really appreciate it, thank you.

    you can change the sync settings in itunes. plug your phone into the computer, select the device in the side bar (it should have an iphone icon next to it), then select the tab for photos to modify the settings for what will and will not be synced.

  • Hi guys. gota 2010 mac mini but want to upgrade so i can stream from mac mini to apple tv. but some herd some bad reviews about os x moutain lion. any of it true?? to mountain lion

    hi guys. gota 2010 mac mini but want to upgrade so i can stream from mac mini to apple tv. but some herd some bad reviews about os x moutain lion. any of it true?

    Mountain Lion is the best OS yet, IMHO.

  • Getting Correct and Incorrect to show on my GUI

    What am i missing to allow correct and incorrect to show on my GUI.
    package anaquiz;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class AnAQuiz extends JPanel {
        private JComboBox choice;
        private JLabel label;
        private JTextField text;
        Button CheckAnswer;
        Button TryAgain;
        private String Answer1 = "Wilson";
        private String Answer2 = "Ace";
        private String Answer3 = "Yes";
        private String input = " ";
        boolean Answer = false;
        JLabel testresult;
        public AnAQuiz() {
            choice = new JComboBox();
            label = new JLabel();
            label.setBackground(Color.blue);
            choice.addItem("Tennis Question #1");
            choice.addItem("Tennis Question #2");
            choice.addItem("Tennis Question #3");
            text = new JTextField(42); //step 4
            Listener listen = new Listener();
            choice.addActionListener(listen);
            add(choice);
            add(label);
            add(text);
        private class Listener implements ActionListener {
            public void actionPerformed(ActionEvent event ) {
            int c = choice.getSelectedIndex();
                switch (c) {
                case 0:
                    label.setText("Whats the famous tennis brand that begins with 'W'?");
                    if (input.equals(Answer1))testresult = new JLabel("Correct!"); //Having difficulty getting the correct and the incorrect to show as a label
                     else testresult = new JLabel("Incorrect!");
                     break;
                 case 1:
                    label.setText("What do you call when someone misses a serve?");
                    break;
                 case 2:
                    label.setText("Should you shake hands after a match?");
                    break;
        public static void main(String[] args)
            JFrame frame = new JFrame("Quiz");
             frame.getContentPane().add(new AnAQuiz());
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.show();

    Basically adding in the code tjacobs01 demo'd for you and a little extra.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class AnAQuiz extends JPanel {
        private int chosen;
        private JComboBox choice;
        private JLabel label;
        private JTextField text;
        Button CheckAnswer;
        Button TryAgain;
        private String Answer1 = "Wilson";
        private String Answer2 = "Ace";
        private String Answer3 = "Yes";
        private String input = " ";
        boolean Answer = false;
        JLabel testresult = new JLabel("");
        public AnAQuiz() {
            choice = new JComboBox();
            label = new JLabel();
            label.setBackground(Color.blue);
            choice.addItem("Tennis Question #1");
            choice.addItem("Tennis Question #2");
            choice.addItem("Tennis Question #3");
            text = new JTextField(42); //step 4
            Listener listen = new Listener();
            choice.addActionListener(listen);
            setLayout(new BoxLayout(this, 0));
            add(choice);
            add(label);
            add(text);
              text.addKeyListener(new KeyAdapter() {
              public void keyPressed(KeyEvent ke) {
                if (ke.getKeyCode() == KeyEvent.VK_ENTER) {
                  input = text.getText();
                  if ( chosen == 0  &&  input.equals(Answer1) )
                    label.setText("Correct");
                  else if ( chosen == 1  &&  input.equals(Answer2) )
                    label.setText("Correct");
                  else if ( chosen == 2  &&  input.equals(Answer3) )
                    label.setText("Correct");
                  else
                    label.setText("Incorrect");
            add(testresult);
            testresult.setVisible(false);
        private class Listener implements ActionListener {
            public void actionPerformed(ActionEvent event ) {
            chosen = choice.getSelectedIndex();
            testresult.setVisible(true);
                switch (chosen) {
                case 0:
                    label.setText("Whats the famous tennis brand that begins with 'W'?");
                    break;
                 case 1:
                    label.setText("What do you call when someone misses a serve?");
                    break;
                 case 2:
                    label.setText("Should you shake hands after a match?");
                    break;
                 default:
                    break;
                text.requestFocus();
        public static void main(String[] args)
            JFrame frame = new JFrame("Quiz");
            frame.getContentPane().add(new AnAQuiz());
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.setVisible(true);
    }

  • I created a slideshow in Elements 12 and burned a DVD in Premiere 12. Why was the orientation of some of some of my slides rotated 90 degrees

    I created a slideshow in Elements 12 and burned a DVD in Premiere 12. Why was the orientation of some of some of my slides rotated 90 degrees?

    Rick
    Have you looked at Delete and Close Gap as well as Delete for what you describe?
    Nonetheless, adding or moving clips to an existing Timeline content without disturbing the existing Timeline content can be challenging and complex under certain scenarios.
    Typical solutions include making these moves with a keyboard modified held down (Windows Alt or Ctr). I am strictly an Elements Windows user, so we will need to find the Mac counterparts for the Windows keyboard modifier techniques.
    Also, if one move triggers a multi-chain disaster, then you should consider grouping block of clips so that they do not move while you are busy with your Timeline maneuvers. Check out the Clip Menu options for Group and Ungroup.
    Some times in the "Mac condition", you need to use fn in addition to the command to achieve some of these Windows counterparts.
    The following video tutorial on arranging clips and keyboard modifiers is being posted for informational non promotional reasons.
    Premiere Elements: Arranging clips on the Timeline using modifier keys | lynda.com - YouTube
    It is demo'd with Premiere Elements 8, but the principles are the same for later versions of the program.
    Here is one variation of the issue on Windows.
    ATR Premiere Elements Troubleshooting: PE: Delete and Close Gap Failures
    You should not have to delete audio to prevent it from being split by an addition to an existing Timeline. The keyboard modifiers should help you resolve this type of issue.
    Please review and consider.
    Thanks.
    ATR

  • How to find the records using contains with the word like this 'some text-some text'?

    Hi,
    How to find the records using the full text contains keyword and that column contains ‘some text-some text’
    In the above some text can be anything.
    Does anybody know please let me know.
    Thanks,

    Hello,
    You can try to create a Full Text Index on the table and use CONTAINS() to get the record which contains the specify words.
    For example:
    SELECT * FROM TABLE WHERE CONTAINS(column_name, 'some text')
    Reference:
    Full-Text Search (SQL Server)
    Creating Full Text Catalog and Full Text Search
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Some character display incorrect after unicode conversion

    Dear Experts,
    Currently we upgrade our SAP system from 4.6B NU to ECC6.0 UN.
    in 4.6B system we had implemented Simple Chinese and French language package to the system. after upgrade to ECC6.0 no-unicode system. we perform a MDMP unicode conversion.currently system running with ECC6.0 unicode interface with language 1EFD. SUMG releated tasks had been finished. Chinese and French language checked OK in ECC6 UN system.
    Our issue is. in the past time. some Spanish local end user typing some spanish character in some master date field when they login in 4.6B GUI choice english as login language.these kind of spanish characters could not display correct in current unicode environment.
    could you please given us some suggestion for how to fix this issue.
    I also sent this message in the Netweaver administrator forums with below links.
    Spanish display incorrect after unicode conversion

    Hello,
    I doubt that the data shown by you in the link was caused by Spanish users logged on in EN.
    I think this was rather caused by utf-8 data uploaded into the Non-Unicode system.
    In this case, you need to repair the according texts manually, I do not know any automatic repair.
    Best regards,
    Nils Buerckel
    SAP AG

  • Website doesn't display correctly, some areas cut off

    All pages of my website cut off some text at the top and bottom. This does not happen with any other web pages I browse! The site was created by our developer and based on a Themeforest theme (from Envato) called Franklin Crowdfunding. Interestingly, my wife's computer does not have this problem and also uses Firefox. So I compared add-ons, extensions, etc. with hers and disabled those on my machine only. Also reinstalled latest Java, Firefox, started in Safe Mode, disabled acceleration and everything else I could find in the troubleshooting section. Nothing has worked. BTW site displays correctly on ipad as well.
    I did notice that the first time I navigated to the page after reinstalling Firefox it worked fine. But after closing and restarting Firefox the problem reappeared.
    Website is www.accoladesintl.com ...red copy at top is partially cut off (bottom half, not top half) and bottom half of the contact info at bottom.
    This problem does not happen in IE. I would rather use your product than it or google, so please help me find the problem!

    You can reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Hold down the Shift key and left-click the Reload button
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (Mac)
    Clear the cache and cookies only from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > Cookies: "Show Cookies"
    You can remove all data stored in Firefox from a specific domain via "Forget About This Site" in the right-click context menu of an history entry ("History > Show All History" or "View > Sidebar > History") or via the about:permissions page.
    Using "Forget About This Site" will remove all data stored in Firefox from that domain like bookmarks, cookies, passwords, cache, history, and exceptions, so be cautious and if you have a password or other data from that domain that you do not want to lose then make sure to backup this data or make a note.
    You can't recover from this 'forget' unless you have a backup of the involved files.
    It doesn't have any lasting effect, so if you revisit such a 'forgotten' website then data from that website will be saved once again.

Maybe you are looking for