What do you do when SJIS isn't Shift JIS

Using Tomcat 4.01 I put the following directive into
JSP pages
<%@ page contentType="text/html; charset=Shift_JIS" %>
A quick test on the database I am using shows that a small percentage of (Japanese) peoples names don't pass through the unicode <=> SJIS conversion. What is more concerning is that 100% of the Japanese addresses in the database don't pass through the conversion cleanly.
If I use the MS932 or Cp943 encodings the tests work
but how can I get Tomcat to use MS932 or Cp943 ?

I assume you are gathering data in a form in which you have specified Shift_JIS as the charset...
It turns out that many JSP containers do not convert form data to Unicode correctly. They often assume incoming data is in the charset of the JSP container or simply in 8859-1. This may be the source of your problems.
One workaround may be the following:
1. include a hidden charset field in the form
2. read the charset from the posted form
3. use that charset to help you retrieve the correct data from the form.
Regards,
John O'Conner

Similar Messages

  • What do you do when there isn't an "Add a buddy" button?

    My iChat doesn't have an add a buddy button, and under the "Buddies" Tab the "add a buddy" option isn't a link.

    Hi,
    When you start iChat for the first time you get a set of Start Up Screens.
    You can Add an AIM valid Name at first then Enable Bonjour then Add  a Jabber ID at later Screens.
    It is possible to click through those Start Up screen and not Enter an AIM Valid Name or a Jabber one and have Bonjour only Enabled.
    This means that in iChat > Preferences > Accounts you will only see the Bonjour account (It is in fact always there even if not enabled)  but the Account info tab on the right will have "Use this Account"  ticked in the check box.
    Bonjour is the method your Mac connects to other Macs on your LAN.
    Those that have iChat ON will show up in your Bonjour Buddy List (It uses their Address Book My Card info - they see your Address Book My Card "Real Name")
    If there are no other Macs on your LAN (with iChat Active with the Bonjour Bit Enabled) then you will see no Buddies in the List.
    As Defcom implies it has no Add Buddy + button.
    Does this sound like where you are up to right now ?
    8:40 PM      Sunday; May 15, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.7)
     Mac OS X (10.6.7),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • What do you do when wi-fi isn't available?

    What do you do when wi-fi is not available?

    roaminggnome wrote:
    You do nothing that requires internet connection.
    I think you've summed up the solution perfectly there, roaminggnome.

  • What do you do when an app has been downloaded but won't open

    What do you do when you download an app from the app store and it will not open once it is downloaded.

    App Zapper is a paid app. AppCleaner does the same thing but is free;
    http://www.freemacsoft.net/appcleaner

  • What do you do when you can't sync your ipod and it tells you that itunes is not compatible with your ipod?

    what do you do when you can't sync your ipod and it tells you that itunes is not compatible with your ipod?

    Upgrade to the newest version of iTunes first to see if that helps.
    B-rock

  • What do you do when you can't read the code on a iTunes gift card?

    What do you do when you can't read the code on a iTunes gift card? I tried taking it back to the store with my reciept, but they said I would have to contact Apple support. Am I out just out $25 dollars?

    See this support article:
    http://support.apple.com/kb/TS1292
    Instructions are at the bottom of that article.
    BTW, this forum is for questions about iTunes U, Apple's service for colleges and universities to post educational material in the iTunes Store. Normally you want to ask your questions in the general iTunes forums.
    Regards.

  • HT204370 what do you do when A preordered movie wont download and says it has already downloaded?

    what do you do when a preordered movie says you cant reorder it when you never got it?

    Try manual install, as outlined in the link below.
    Basic troubleshooting steps  
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101

  • HT201412 what do you do when your phone numbers no longer have the contact persons name just a number. Also names are missing from the address  book where contacts are.

    what do you do when your phone numbers no longer have the contact persons name just a number. Also names are missing from the address  book where contacts are.

    I, too, love everything about my phone. The other day I tried to crash my Z10 by running multiple apps and having videos running in the background. Do you think my Z10 showed any signs of slowing down? Nothing doing! It ran as smooth as silk. I'm very impressed.
    Cheers.
    - If my response has helped you, please click "Options" beside my post and mark it as solved. Clicking the "thumbs up" icon near the bottom of my response would also be appreciated.

  • What do you do when you turn  ipod touch on and the apple apears and stays  on  wont turn off

    what  do  you do  when you turn  your  ipod touch on  and  just  the apple appears  wont shut off

    Try:                                               
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable       
    - Try on another computer                            
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar                                     

  • What do you do when you download a show and it has no sound? ( the volume is up on itunes and my computer)

    what do you do when you download a show and it has no sound? ( the volume is up on itunes and my computer)

    That's what iTunes -> Preferences -> Playback -> Sound Check does - equalizes the volume across tracks to provide a more-even playback.

  • What do you do when ipod is detected but not identified?

    What do you do when ipod is detected but not identified?

    Hi there schnee2,
    You may find the troubleshooting steps in the article below helpful.
    iPod not recognized in My Computer and in iTunes for Windows
    http://support.apple.com/kb/ts1369
    -Griff W. 

  • What can you do when you forget your iPod password and it locks you out?

    What can you do when you forget your iPod passcode and it locks you out.

    http://manuals.info.apple.com/en_US/iPod_touch_iOS4_User_Guide.pdf

  • What do you do when a movie you buy, will not down load?

    what do you do when a movie you buy , will not down load?

    I tried again this morning. All I see is a white screen with the words "iTunes Store" in the center of it, in gray. When I click on store at the top, and then "Home", the top of the browser says "Accessing iTunes Store" with a progress meter that goes halfway, stops and then it turns into the black Apple logo. Same thing happens when I try to click on that little house icon.
    Do you guys see album covers in there, or what? I downloaded the itunes software yesterday to my desktop AND laptop, and I am experiencing the same problem on BOTH computers. I am running Vista Home Premium, on DSL.
    Oh, and thank you for the link to the troubleshooting for this--I am reading it now, trying to figure this out.
    I finally figured out that I could access the iTunes store from my iPod (duh!!) last night, but I'd like to be able to do this on my PC too. So it's larger and easier to see.

  • What do you do when you disabled your ipod because you forgot your passcode

    What do you do when you have disabled your ipod touch because yuo forgo you password to get in. Thanks!

    Connect to iTunes on the computer you usually Sync with and “ Restore “...
    http://support.apple.com/kb/HT1414
    If necessary Place the Device into Recovery mode...
    http://support.apple.com/kb/HT1808

  • What do you do when it says the required disk cannot be found?

    What do you do when iTunes says the required disk cannot be found?

    Quit iTunes, restart your iPad, restart your computer and then try again.
    If you have another USB to dock connector cable - use that one when you try again. Use another USB port on the computer as well.

Maybe you are looking for

  • Can't Import Songs To iTunes Using Apple Lossless Encoder

    I have about 4,000 songs in FLAC format (which is a lossless format) on my external hard drive. I want to import them into iTunes using the Apple Lossless Encoder. I called Apple support and asked them how to do this, and they told me to go under "Pr

  • Can't install itunes on my windows

    when I try to install itunes or quicktime, the file will not open. it hs been downloaded to my machine, but it will not open when try.I have deleted old quicktime and itunes files, but it didn't help. what shall I do?

  • Filters with variables user-exits on queries

    Is it possible to define complex selection criteria by using the EXIT_SAPLRRSO_001?. Something similar to what we may do a select for Sap: Select * from table where ((field1 = value1 and field2 = value2) or (field1 = value3 and field2 = Value4)). I g

  • Keyword problems in 3.3...

    Trying to move a keyword from a nested catagory to the root in the Keyword HUD. In previous versions of Aperture, when you dragged the keyword outside of the list of keywords, but still inside of the HUD itself, a white rectangle would appear around

  • Customising Who's Who- ESS?

    HI all,   We are using EP 6.0, mysap ERP 2004 and ESS BP 60.2. In ESS, Who's Who is working fine, but want to remove one link ( Organization Unit). My requirement is either i have to remove the Organization Unit link as a whole or just want to displa