Difference between en_US, ja, UTF8

Here is the description of the puzzle. I have a J2EE application. If I set server locale as ja, input Japanese characters are corrupted when it is displayed back after hitting a submit button on the page. But If the server locale is en_US, the Japanese characters are preserved. What bothers me is that en_US use ISO8859-1, which is a subset of Unicode, but not necessarily has DBCS covered, why the Japanese characters are able to be processed when server locale is en_US ? While when server locale is ja, the Japanese characters are corrupted ? Theoretically, Java use Unicode, it suppose to process any characters correctly with right encoding information, no matter what the locale is set. But here en_US works while ja fail. It would make more sense to me either both en_US and ja work or neither of them work.
Any help on this is highly appreciated.

Sounds horrid.
A couple of things... you are correct in that everything within Java is stored as Unicode (UTF-8). The encodings should only ever make a difference when you're using the text outside of Java. Just looking at your description, this is likely to be happening in one of two places - when the text is being displayed on a JSP page, or when it is being stored in a database.
You talk of the characters being corrupted when they are 'displayed back after hitting a submit button on the page', so I'll assume it's a JSP - but please correct me if I'm wrong.
The most likely cause of your problem is that the JSP page will have its own encoding that could well be independent of whatever the server locale is set to. By default, this encoding is often ISO8859-1 or CP1252, both of which are subsets of UTF-8, and do not handle Japanese characters.
Try tinkering with the charset that the page uses. You can do this by throwing the following META tag into the top of each JSP page, and playing with the value that appears after the 'charset' keyword. I'd suspect that SHIFT_JIS is the most likely to work.
<META http-equiv="Content-Type" content="text/html; charset=SHIFT_JIS">Hope that helps,
Martin Hughes

Similar Messages

  • What is the difference between Video-out and mirroring?

    What is the difference between Video-out and mirroring? I can't get iPhone 4 video to work on my TV screen
    I have just bought an MD098ZM/A (Apple 30-pin Digital AV Adapter). I am struggling to get it to show a picture on my TV. I know I'm doing something right because the audio is coming out of my TV speakers but no picture on the TV screen.
    I have used the same HDMI channel (on the TV side) with the same cable and my thunderbolt port (MacBook Air) without any trouble - and on the same app (BBC iPlayer download then full-screen mode).
    Now I note that the packaging for the MD098ZM/A says video-out on iPhone 4 but mirroring only on iPhone 4S. I only have an iPhone 4 (not the 4S). Now if the lack of iPhone 4 support for mirroring means that I can't play video material out to my TV, then in what sense is there any video-out capability at all?
    There is only safety and warranty paperwork in the Apple adapter packaging - no help information. And I haven't found further guidance online either.
    I do note somewhere online that it suggests that basic non-mirroring video-out (for this adapter) only works with some external TV sets. Any way of finding out which? I'm using a Sanyo CE32LD90-B LCD TV if it helps.
    So far not doing very well.

    Now found these but have had to give up on this adapter!
    http://manuals.info.apple.com/en_US/iphone_user_guide.pdf
    http://support.apple.com/kb/HT4108

  • What's the difference between 2nd and 3rd generation

    PLEASE HELP! New Apple user and looking to purchase a used 2nd or 3rd generation ipod touch.
    what's the difference between 2nd and 3rd generation?
    apparently I am told that the 2nd gen does not have the capabilities of listening without headphone? and the 3rd gen does??

    Hi maximumslowness - (great name),
    The 2nd gen Touch has one internal speaker, so you can listen to it, (both left and right channels) without headphones.
    However - it's a small single speaker and it is not very loud. It's not designed for quality listening (neither is the speaker on the 3rd gen as far as I know) and probably will not be adequate if there is a lot of background noise nearby.
    One option is to drop the iPod (not literally!) into an iPod Docking station so that the sound can play out through a self-contained mains-powered amplified speaker, which will also charge your iPod. There are many on the market. On the bottom of the iPod is the 30-pin dock connector which can be used to feed the audio to a docking station. Another option is simply to use a cable to connect from the headphone socket to the audio input on any amplifier.
    Yet another is to plug in a small fold-up style speakers, such as
    http://www.amazon.co.uk/Portable-Folding-Speakers-iPods-Players/dp/B000A1QKNU/re f=sr_1_84?ie=UTF8&qid=1332326622&sr=8-84
    or http://www.amazon.co.uk/Generation-Capsule-iPhone-Laptop-Speaker/dp/B002XNO7FQ/r ef=sr_1_6?ie=UTF8&qid=1332326656&sr=8-6
    I've no idea how good the sound is, you'll have to judge that for yourself. The links are both to a UK store, but most countries will have a similar option.
    I do not recieve any form of payment or compensatiion for the above links.
    Message was edited by: the fiend

  • Max execution time per pixel causing rendering differences between GPUs

    Is there a maximum execution time different graphics cards
    will process each pixel as part of the shader? When running the
    Raytracing script (
    http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&loc=en_us&extid=1634 018
    ) on my Macbook Pro (256MB ATI Radeon X1600) then many pixels come
    out grey or black as the loop per pixel that is tracing the ray
    takes longer than some built in execution limit.
    I first noticed this with a filter I've been working on which
    looks fine on my alu iMac (512MB Nvidia GeForce 8800 GS) but
    rubbish on the Macbook Pro or older iMacs.
    Are there ways around this limit like splitting long for or
    while loops into smaller chunks, or is it just a hardwired max
    execution time per pixel?

    I don't think you can time out on processing an individual
    pixel, but I could be wrong. You could try reducing the number of
    reflections in the filter and seeing if that fixes the problem. It
    could be a math precision difference between the cards.
    Shaders can (and will) time out, but individual pixels
    shouldn't. It could also be a driver issue with the structure of
    the filter. I have a x1600 mac book pro here and I'll try it out if
    I get a chance.

  • Is there any difference between an HP Photosmart 7510 and 7520?

    Is there any difference between the HP Photosmart 7510 printer and the 7520?
    I have tried asking HP. They were not able to help. Presales advice for domestic customers appears to be virtually non existent in the UK.
    All  I know is that Argos deal with Ingram Micro to get the 7520.
    Is the 7520 just a marketing ploy - selling the same product for a different price? 

    Yes there is a difference. They are not the same; however, they are based on the same platform (engine).   The 7520 is the newer model which just replaced the 7510. 
    The main differences is the 7520 includes a hardware fax  built-in whereas the 7510 used the efax utility in order to send faxes.  This essentially allows you to fax directly from one fax machine to another without using a server based method.
    Other features on the 7520 include addition of a Scan to email feature as well as the addition of a USB 2.0 port on the front of the printer.
    You can find the complete 7520 product specs on the hp website: 
    http://shopping.hp.com/en_US/home-office/-/products/Printers/HP-Photosmart/CZ045A?HP-Photosmart-7520...
    Though I work for HP, My posts express MY opinion, and not those of HP.

  • Re: The difference between update() and doFinal() in ClassCipher

    Hi Guys,
    I found this topic,
    The difference between update() and doFinal() in ClassCipher
    during a Google Search. I need your help, because I'm working on a project for an university exam.
    It's about a Client FTP that sends and received files with the content crypted.
    I'm using DES Encryption with "DES/CBC/PKCS5Padding".
    I have this doubt: when it's correct to uso the doFinal method? At the last block of the file, or after it? (for encryption)
    And during the decryption, how can I use the result of the doFinal operation?

    Reposting with &#123;code} tags
    capagira87 wrote:
    Ok these are the functions:
    public void CodificaInvia (String cd, String filename, SecretKey Key) // it opens, codes and sends to the server the content of the file 512 bytes per time
    int returncode=0;
    Socket DataSock = null;
    FileInputStream fis = null;
    byte [] text = null;
    try {
    DataSock = new Socket (servAddress,22);
    ObjectInputStream cin = new ObjectInputStream (DataSock.getInputStream());
    ObjectOutputStream out = new ObjectOutputStream (DataSock.getOutputStream());
    byte[] iv = new byte[] { (byte) 0x8E, 0x12, 0x39, (byte) 0x9C, 0x07, 0x72, 0x6F, 0x5A };
    AlgorithmParameterSpec paramSpec = new IvParameterSpec(iv);
    Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
    cipher.init(Cipher.ENCRYPT_MODE, Key, paramSpec);
    fis = new FileInputStream (cd+File.separator+filename);
    int size = fis.available();
    if ((size%8)==0)
    text = new byte [size];
    } else {
    do {
    size++;
    } while ((size%8)!=0);
    text = new byte [size];
    fis.read(text,0,fis.available());
    byte [] ciphertext = cipher.doFinal(text);
    out.writeInt(ciphertext.length);
    int numblock = ciphertext.length/512;
    int resto = ciphertext.length%512;
    out.writeInt(numblock);
    out.writeInt(resto);
    byte [] tempblock = new byte [512];
    for (int conta=0; conta<numblock; conta++)
    for (int i=0; i<512; i++)
    tempblock=ciphertext[(conta*512)+i];
    out.write(tempblock);
    out.flush();
    if (resto > 0) // this block works if the file size is not multiple of 512
    java.util.Arrays.fill (tempblock, (byte) 0);
    int h= numblock*512;
    for (int i=0; i<resto; i++)
    tempblock[i]=ciphertext[h+i];
    out.write (tempblock);
    out.flush();
    System.out.println ("OK!");
    } catch (Exception e)
    e.printStackTrace();
    public void RicezioneDecodifica (String filename, SecretKey Key) // in this function I receive the file blocks, I decrpyt them and I save the decrypted text into a file
    Socket DataSock = null;
    byte [] buffer=null; // it saves the received data
    String Plaintext = new String (); // it saves the deciphered text
    try {
    ServerSocket ss2 = new ServerSocket (TRANSMISSION_PORT);
    DataSock = ss2.accept();
    ObjectOutputStream out = new ObjectOutputStream (DataSock.getOutputStream());
    ObjectInputStream cin = new ObjectInputStream (DataSock.getInputStream());
    byte[] iv = new byte[] { (byte) 0x8E, 0x12, 0x39, (byte) 0x9C, 0x07, 0x72, 0x6F, 0x5A };
    AlgorithmParameterSpec paramSpec = new IvParameterSpec(iv);
    Cipher dcipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
    dcipher.init(Cipher.DECRYPT_MODE, Key, paramSpec);
    int size = cin.readInt();
    int numblock = cin.readInt();
    int resto = cin.readInt();
    if ((size%8)!=0)
    do{
    size++;
    } while ((size%8)!=0);
    int ByteLetti=0; // counter of read bytes
    buffer = new byte [size];
    for (int conta=0; conta<numblock; conta++)
    int a=cin.available();
    byte [] tempblock = new byte [a];
    cin.read(tempblock, 0, a);
    for (int i=0; i<a; i++)
    buffer[ByteLetti+i]=tempblock[i];
    ByteLetti=ByteLetti+a;
    byte[] texttmp=dcipher.update(tempblock);
    String tmp = new String (texttmp, "UTF8");
    Plaintext=Plaintext+tmp;
    if (resto>0)
    int a = cin.available();
    byte [] tempblock;
    if ((a%8)>0)
    do {
    a++;
    } while ((a%8)!=0);
    tempblock = new byte [a];
    cin.read(tempblock, 0, cin.available());
    byte[] texttmp = dcipher.doFinal(tempblock);
    String tmp = new String (texttmp, "UTF8");
    Plaintext = Plaintext+tmp;
    ObjectOutputStream oos = new ObjectOutputStream (new FileOutputStream (filename));
    oos.writeChars(Plaintext);
    oos.flush();
    oos.close();
    } catch (Exception e)
    e.printStackTrace();

  • Difference between 1333 and 1600 mhz for 16Go RAM

    Is there a big difference between a 1333 and 1600 mhz 16Go RAM and does my macbook pro 13" (2,9GHz intel core i7 - actually on 8Go RAM - 2011) support those?
    Is this one ok for my mac? : http://www.amazon.fr/memory-upgrades-1333Mhz-MacbookPros-laptops/dp/B006FW8RCU/r ef=sr_1_2?ie=UTF8&qid=1382738058&sr=8-2&keywords=Mémoire+16+Go+%282+x+8+Go%29+SO DIMM+1333+MHz+DDR3+PC3-10600
    Thanks,
    T.Dehon

    1333 MHz RAM for your machine. Don't use anything else but what is recommended.
    Maximum Memory
    16 GB (Actual) 8 GB (Apple)
    Memory Slots
    2 - 204-pin PC-10600 (1333 MHz) DDR3 SO-DIMM

  • Difference between two FRU's

    Can anyone tell me the difference between FRU 03x3617 and 03x3744?  Apparently, both correspond to the RAID 700 Adapter II card.  According to Lenovo support, they both map to a LSI MegaRAID SAS 9260-8i card.  I believe they both have a manufacturers part number of 0A89463.  However, I was told that only 03x3617 is compatible with my particular TS430 and the 03x3744 wouldn't work.  Can someone confirm that this is correct and explain how this is possible?
    I found numerous sources on the Lenovo website which all told me that I was buying the correct card (using the part number), but now tech support is telling me that the card won't work.  I'd be glad to share the sources and explain the issue to anyone from Lenovo that's willing to help me.
    Thanks.

    Hello LeonB,
    When you look at the FRU Parts listing for the TS430, FRU 03X3617 is what is supported in the TS430.  The other FRU that you mentioned is for a RD240.  However, both are a LSI 9260-8i card.   Since they have different FRU numbers, they are not exactly the same card.  There are typically differences in ship level firmware and there are potential hardware improvements that we make to newer FRU parts.  We do not have any BIOS whitelisting for the LSI cards so either should work in your TS430.
    http://support.lenovo.com/en_US/product-and-parts/detail.page?DocID=PD015767

  • What's the difference between "Analyze amplitude" and "Analyze Loudness statistics" ?

    Hello!
    I wanted to find out tracks's RMS and found these 2 variants of measuring:
    http://help.adobe.com/en_US/Audition/3.0/help.html?content=WS58a04a822e3e5010548241038980c 2c5-7f54.html
    http://help.adobe.com/en_US/Audition/3.0/help.html?content=WS58a04a822e3e5010548241038980c 2c5-7de9.html
    What's the difference between them? Because the result of measuring was varied.
    Regards,
    Roman

    [email protected] wrote:
    > Hello!
    > I wanted to find out tracks's RMS and found these 2 variants of
    > measuring:
    >
    This is the one you use to find a tracks rms.
    >
    This one is in the context of group normalizing and comes with frequency
    compensation.
    > What's the difference between them?
    You use the first if you want to know the average and rms levels of a track.
    I always use a rms window of 300 milliseconds because that was the VU
    integration time of old and because that fits the averaging window of the
    sense of hearing.
    > Because the result of measuring
    > was varied.
    Group normalizing interprets the statistics prior to presenting them, I have
    also wondered why there is not there an option that gives the same result as
    the analyze amplitude tool. Manually adjusting to the average with 300 ms
    rms window generally works better for me and my way of listening than the
    group tool, consequently I miss having the same options available there.
    However you should always remember to listen, because some atypical audio
    needs to be more quiet or slightly louder to sound right in some context.
    > Regards,
    > Roman
    Kind regards
    Peter Larsen

  • Difference between my-secure-amf and my-secure-http

    Whats the difference between my-secure-amf and my-secure-http?

    For historical reasons, an "AMF" channel is binary encoded AMF byte stream over HTTP.  an "HTTP" channel (bad name!) is an AMFX encoded XML stream over HTTP.
    For more on the different types of channels see the documentation here: http://help.adobe.com/en_US/LiveCycleDataServicesES/3.1/Developing/WSc3ff6d0ea77859461172e 0811f00f6e876-7fecUpdate.html
    Tom

  • Difference between New Archieve and New Patch

    Hi,
    I am going through import and export topics of LCA files (http://help.adobe.com/en_US/livecycle/9.0/workbenchHelp/help.htm?content=000276.html ). I understood how we can create new Archieves and import it to another environments. But I am not able to understand about patches.
    In both the cases, I am doing the same thing. I am creating archieve of the application. I am sure, there would be difference between "new archive" and "Patch" but not able to figure out.
    Can anyone let me know if I create new archieve and Patch, then what is the visual differences i can look in both the archieves??????
    Regards
    Sunil

    patching is related to component of LiveCycle.
    these are  basically jar files updated with new one. For more please look here.
    http://help.adobe.com/en_US/livecycle/9.0/workbenchHelp/help.htm?content=000960.html
    LCA files are simply archive file of the processes/application that you create in workbench. These archive files can be import to other environment  at later stage.
    -Vijay

  • HT4262 What is the difference between a WDS Remote and WDS Relay?

    I am just wondering what the difference between the two are?

    A Remote basically extends the signal of the main base station.
    The "Relay" relays the signal to a "Remote"...
    The Relay will allow you to get the signal further out in conjuction with the Remote.
    See this Apple doc:
    http://support.apple.com/kb/HT4262?viewlocale=en_US&locale=en_US

  • Difference between varchar2(4000 byte) & varchar2(4000 char

    Hi,
    My existing database NLS parameters as follows
    CHARACTER SET US7ASCII
    NATIONAL CHARACTER SET AL16UTF16
    created a test database to support globalization, I changed as follows
    CHARACTER SET UTF8
    NATIONAL CHARACTER SET UTF8
    some of the table column datatypes are varchar2(4000)
    I would like to know what is difference between VARCHAR2(4000 BYTE) and VARCHAR2(4000 CHAR).
    Thanks

    Indeed, VARCHAR2(x BYTE) means that the column will hold as much characters as will fit into x bytes. Depending on the character set and particular characters this may be x or less characters.
    For example, a VARCHAR2(20 BYTE) column in an AL32UTF8 database can hold 20 characters from the ASCII range, 10 Latin letters with umlaut, 10 Cyryllic, 10 Hebrew, or 10 Arabic letters (2 bytes per character), or 6 Chinese, Japanese, Korean, or Devanagari (Indic) characters. Or a mixture of these characters of any total length up to 20 bytes.
    VARCHAR2(x CHAR) means that the column will hold x characters but not more than can fit into 4000 bytes. Internally, Oracle will set the byte length of the column (DBA_TAB_COLUMNS.DATA_LENGTH) to MIN(x * mchw, 4000), where mchw is the maximum byte width of a character in the database character set. This is 1 for US7ASCII or WE8MSWIN1252, 2 for JA16SJIS, 3 for UTF8, and 4 for AL32UTF8.
    For example, a VARCHAR2(3000 CHAR) column in an AL32UTF8 database will be internally defined as having the width of 4000 bytes. It will hold up to 3000 characters from the ASCII range (the character limit), but only 1333 Chinese characters (the byte limit, 1333 * 3 bytes = 3999 bytes). A VARCHAR2(100 CHAR) column in an AL32UTF8 database will be internally defined as having the width of 400 bytes. It will hold up to any 100 Unicode characters.
    The above implies that the CHAR limit works optimally if it is lower than 4000/mchw. With such restriction, the CHAR limit guarantees that the defined number of characters will fit into the column. Because the widest character in any Oracle character set has 4 bytes, if x <= 1000, VARCHAR2(x CHAR) is guaranteed to hold up to x characters in any database character set.
    The declaration VARCHAR2(x):
    - for objects defined in SYS schema means VARCHAR2(x BYTE),
    - for objects defined in other schemas it means VARCHAR2(x BYTE) or VARCHAR2(x CHAR), depending on the value of the NLS_LENGTH_SEMANTICS parameter of the session using the declaration (see the NLS_SESSION_PARAMETERS view).
    After an object is defined, its BYTE vs CHAR semantics is stored in the data dictionary and it does not depend on the NLS_LENGTH_SEMANTICS any longer. Even Export/Import will not change this.
    Character length semantics rules are valid for table columns and for PL/SQL variables.
    -- Sergiusz

  • Differences between the 2 ways to play local swf files in flash player

    There are 2 ways to allow the flash player to play local swf files:
    Add the directory/file of the swf to the Global Flash Player Trust directory. http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9 b90204-7c95.html
    Add the directory/file of the swf to the Trusted Location Settings in the Local Settings Manager.http://help.adobe.com/en_US/FlashPlayer/LSM/WS6aa5ec234ff3f285139dc56112e3786b68c-7ff0.htm l#WS6aa5ec234ff3f285139dc56112e3786b68c-7fea
    Adobe doesn't mentioned in the document what's the differences between these 2 methods, and they look has the same effect. But when I'm doing it on OS X, Safari 6.1, the first method doesn't work (It was working when I was using Safari 6.0). And then I tried method 2, it works…
    So I'd like to ask what are the differences between these 2 methods to play local swf files?

    For playing local SWF files, Download the Macintosh Flash Player 11.9 Projector
    It's a standalone app. Just copy it to your Applications folder. Launch it, and drag the SWF to the Dock icon. It'll play.

  • The Difference Between?

    Ok so I believe I know the answer here but asking anyway.
    What is the difference between the adobe creative cloud team license vs the adobe creative cloud enterprise license?
    is the team licence basically individually licences products per account users?
    and is the enterprise one license that covers multiple users at once?
    Thanks and sorry for the question but had to verify.

    Hi tbirdbrent ,
    Thank you for posting on the forums, the answer to your question is as follows.
    1) Creative Cloud for teams brings together the very latest Creative Cloud desktop apps, updates and upgrades the moment they’re released, and all of the services and business features your team needs to create their best work and collaborate with their peers. Adobe offers two Creative Cloud for teams plans — you can opt for a complete plan (all apps and services) or a single-app plan such as Photoshop CC (access to one app and select services). With each option, you’ll receive access to the same easy-to-use web-based admin console that allows the administrator to centrally purchase, deploy, and manage all seats across your organization — whether single app or complete — under one membership agreement.
    2) Creative Cloud for enterprise is for organizations with large deployments that require centralized provisioning and customized deployment of apps and services. Enterprises also receive enterprise customer support and expert services. Creative Cloud for enterprise also works with Digital Publishing Suite; Adobe Anywhere for video; and Adobe Marketing Cloud, which includes Adobe Experience Manager — all sold separately.
    Also, the team licences is not individually licences products per account users and the same goes with the enterprise license.
    Thanks,
    Vikrantt Singh

Maybe you are looking for

  • Issue while running IQY web queries

    Hi All, I have a problem with the iqy file, i have a couple of parameters in the web query (to_date & from_date)....if i run it for 10 days it runs fine........but if i run it for 1 month it gives me an error "the site reports that the request is not

  • How do I import google calendar to iCloud?

    Is there any easy way to import my Google calendar(s) into iCloud? Thanks, Randy B.

  • How to keep Flash in Full Screen on Dual Monitors

    Hi, I have a simple question. What should I do, to make my application (written in Flex SDK 4.5.1) staying in Full screen when I work in 2nd monitor - like Youtube and Euronews player (http://www.euronews.com/news/streaming-live/) ? I don't know, how

  • ETA date in Nomination monitor is missing.

    Hi Gurus, Ive maintained an ETA - date on nomination but when i see the log of my xml .. value of ETA date is 00000000.. can somebody help me, why system generate the 0 value..

  • Ipad will not restore in Recovery Mode due to Passcode

    Hi There, my 9 got a new ipad 2 for xmas and he has forgotten his passcode. I have put the Ipad in recovery mode and connected to itunes but right at the end it states ipad cannot connect to itunes because of the passcode. Ive tried find my iphone an