Want clarification on charset concepts

Hi,
after reading some articles about java i18N, i am still not very clear about the reason why the problem (below) exist..
1. write a java class, say Test1 (source code in UTF-8) with some multibyte characters, say chinese, japanese chars,
2. compile with option -encoding....
3. run in locale, say chinese or japanese, the chars display correctly (output by system.out.println(...))
4. but if changing the locale to others, say english, the chars display incorrectly
i have 2 questions:
1. for step 2 about compiling java source...
what will be the multibyte chars (chinese, japanese) be in the bytecode (.class) file? they get convert from utf-8 to utf-16? or stored in platform specific charset ?? how the java vm read in these chars when running?
2. after changing locale from chinese, japanese to english (without recompiling the source file) ... multibytes chars can't display correctly..
is it related to java vm incorrectly reading the string literal embedded in the bytecode file...???
if yes, how can i instruct the java vm to interpret bytecode under a specific locale (without changing system setting, eg. make change in regional setting in windowxp) or compile java program in a locale independent way so that the program can really be portable?
if no, could anybody explain the cause in details? give me steps by steps guide to write portable java program, start from choosing source file encoding, javac options to reading multibyte chars from database?
thank you very much!!!!

If this was your problem all along, why on earth start out by asking a completely different question, wasting people's time?
Anyway, the first comment on your database problem: you do know that it's a recipe for disaster - if not now, then somewhere down the road - to define your DB with a Latin1 character set, and then storing Chinese characters in that DB? It may work for you now, in one specific, controlled environment, because you happen to know that you need to specify big5 as the db connection setting. But what happens when somebody else tries to access your data? Or when you need to get both Chinese and French data? The only sensible solution is the define your DB with UTF8 (or, if you really only have Chinese data, with a Chinese-specific encoding - but that is of course a shortsighted solution).
To get to your specific problem: if your code works with the default locale set to Chinese, but not if your default locale is set to English, then the data is being converted to the default encoding of the JVM somewhere (question marks being an indication that a converter did not find an appropriate character in the target encoding - which would be the case for an attempted Big5 -> 1252 conversion).

Similar Messages

  • Want to understand SID concept...

    Hello experts,
    why not using the value like e. g. customer number directly in the dimension table instead of a SID? So I also could save one table (SID table)  and with this on JOIN by linking directly to the master data tables (text, attributes, hierarchies) using customer no. as key.
    Am I wrong? Is it only because of this INT4 thing with the SIDs whitch maybe results in better performance?
    What I maybe understand is compounding, it seems to be hard to make here a connection to the right master data table. But if I wouldn't have this case, why else could be this SID useful?
    Best regards,
    Peter

    Hello Siggi,
    thank you for your answer and the linke you provided. I think star schema concept and using surrogate ID's for dimension tables is absolute clear for me and I see the advantage there.
    How I said, faster DB access using INT4 values instead of characters is also a point I understand. On the other side SAP BW offers you to use a line item dimension which saves a join and result in a better performance.
    But why not give the BW developers the chance to decide if you want use it? If your InfoObject is a numeric one, you are may be much faster, saving a join and having an even easier to handle value.
    What I am interested in is, if SID technology is so deeply part of SAP BW, for example if you want to report on an DSO you also need SID's, what is the real advantage usind SID's every time for access of InfoCube or DSO data?
    See, i read for example the following advantages of BW star schema on [this site|http://learnmysap.com/sap-bw/138-classic-and-sap-bw-star-schema-comparisons.html]:
    -> Faster access to data than via long alpha-numeric keys. SAP BW use automatically generated INT4 keys for SID and Dimension ID
    ->  Can model in easy way: Historizing, multi-lingual, and shared dimensions. It is happen because of the excavation of master data from the dimension tables using the SID technique.
    ->  The query performance is improved here as aggregated key figures can be stored in their own fact tables.
    OK, first point about INT4-keys we discussed.
    I completly don't understand the second point and why therefore SID's are needed.
    Third point depends on disadvantages of the classical star schema compared to bw aggregates, a point I understand
    Often I read: The SID table provides the link between the master data and the dimension tables. (like here: /people/githen.ronney3/blog/2008/02/13/modeling-strategies)
    But why shouldn't this be possible just with the key value?
    Even SAP just describes his enhanced star schema without SID's, but technically SID's are used. Why not use it like SAP itself describes here:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/4c/89dc37c7f2d67ae10000009b38f889/content.htm
    regards,
    Peter

  • Need clarification on the concept of "reset logs"

    Hi,
    When the database is in Archive log mode and once crashed will be recovered using the below command :
    SQL> startup nomount
    SQL> Alter database recover automatic using backup controlfile until cancel;
    Once the database is recovered, we give the below command:
    SQL> recover cancel;
    After the above steps, we have to perform below command which I am not able to understand.
    SQL> alter database open reset logs;
    I am not able to appreciate the purpose of resetting the logs...why not we allow the database to proceed with the log file sequence.
    Any information on the "reset logs" concept would be helpful to me.
    Thanks in advance
    Vineela

    hi vineela,
    this is the portal content management forum. for your database question please use the database forums:
    http://forums.oracle.com/forums/index.jsp?cat=18
    thanks,
    christian

  • I want clarification on unlocked 5s

    So my dad is planning to get some iPhones for our family. I suggested to choose the T-mobile contract-free version so we don't have to worry about monthly fees and such (if that is how that works).
    So if we go with contract-free, I can basically:
    watch however much 1080p videos I want on YouTube.
    call however much I want (I probably wont)
    have unlimited data input
    ; all for one price that we pay when getting the phone (or split up 12 to 18 months), correct?
    I'm wondering how the phone will work internationally, however. I live in US of A and go to Japan once in a while. Will the unlocked phone work in that country, as in, can I use the phone network?

    Hi minfremi,
    The T-Mobile "contract free" plan does not provide you with free data - it allows you to use other sim cards with the phone. Here is a link to the T-Mobile website where you can get more information:
    http://www.t-mobile.com/cell-phone-plans/individual.html
    Cheers,
    GB

  • Want to learn new concepts, Help...

    Hi
    I am good in oracle up to version 7.x.
    After 7.x there are many new concepts have come in
    8, 8i, 9i, 10g ...
    Coming to D2K, upto forms5.0,reports3.0 I am OK, again
    later versions 6, 6i, 9i, etc...
    How do I train my self on these new concepts right from
    table partitioning to all new concepts?
    I am looking for some sort of documents which will have examples for practicing.. Please guide me in this
    Thanks
    Sai

    The various new features guides on http://tahiti.oracle.com are probably good places to start looking. Most will have an example or two for many of the newer features.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Concept of free –m command in Linux

    I wanted to know the concept of free –m command as there are different rows of Mem, -/+ buffers/cache & Swap in the output. As an example, it is showing 195 as free Mem in my server but 13850 in the free section of the -/+ buffers/cache. The output needs in depth knowledge of the different parameters of the command.
    I hope, my question is clear.
    Please revert with the reply to my query.
    Regards

    This is my understanding. used and free column in line 2 can be used to find out total used and free memory for applications
    [oracle@test ~]$ free
    total used free shared buffers cached
    Mem: 264122724 253692112 10430612 0 2074864 178696468
    -/+ buffers/cache: 72920780 191201944
    Swap: 8388600 0 8388600
    select 264122724/1024/1024 "Total RAM" FROM DUAL; (264122724 ---from line 1 Mem)
    Total RAM
    251.887058
    select (253692112-(2074864+178696468)) "used for applications" from dual; (used from line 1 - (buffers + cached) from line 1)
    used for applications
    --------------------- (matches with used from line 2)
    72920780
    select 10430612+2074864+178696468 "total free for applications" from dual;
    total free for applications
    191201944 (matches with free from line 2)
    Edited by: vlethakula on Jan 17, 2013 7:18 AM

  • PNP concept

    i want to know the concept of PNP logical database (SAP HR module) supported by an example program.
    Also, could someone explain what <u>get pernr.</u> event does and the significance of specifying <u>tables : pernr</u>   in PNP logical database program.
    Also, how is provide end-provide different from select end select.
    answers will be rewarded.

    Hi Soumali,
    welcome to SDN forum.
    PNP logical data base conrtain various definitions related to HR employee selection data.
    For details on it goto SE36 And give PNP.
    Get Pernr actuall collects all the data based on the selection screen into the mentioned infotypes in the program.
    For more reference you may check out this program - RPLADDJ0, RPLICO10, etc.
    Regards,
    Amit

  • SEM: BCS Balance Carry Forward - Concept of Period 00

    Gurus:
    Wants to clear a concept with you. Say for example at the end of Period 12, 2006,
    B/S Account 1: $100,000
    Retained Earnings: $ 200,000
    And only for the Period 1, 2007:
    B/S Account 1: $200 (this is a periodic value)
    And Net Profit: $15
    Now let’s assume the Retained Earnings of Current Month = RE Last Month + Net Profit.
    Now if we don’t do a Balance Carry forward after Period 12 close and before Period 1 close, I will be getting this only for Period 1,
    B/S Account 1: $200
    Retained Earnings: $15
    But if we do a BCF after Period 12 close and before Period 1 close, I will be getting this only for Period 1,
    B/S Account 1: $100,200
    Retained Earnings: $200,015
    So the BCS gets the value in period 00 and in backend add it to period 1 to give a cumulative period 1. Period 00 is a virtual place holder for this and not be available for reporting.
    Am I correct?
    Thanks for your time spent,
    Regards,
    Arpan

    Thanks Eugene!
    I am sure you are correct, but not able to understand the answer for my this question from the thread you mentioned. Was thinking of BCS & period 00 concept and trying to confirm my understanding. Sorry for not able to pick up the loose thread. Still open..
    Sincerely,
    Arpan

  • Concept of Interactive Report by click on filed displaying next screen

    Hi,
    I want to know the concept of Interactive report i have work on simple and ALV reports, as per my present requirement of vendor outstanding balance  i have made a report as per my requirement i have data in 3 final tables  itab1  itab2   itab3,
    itab1 have all the data related to vendor bills line item wise,    itab2  have the data only as per vendor  means for one vendor one entry adding all the line item amount in one  row,   itab3 have the data as per reconcile account    
    in my requirement  firsti want to display  itab3       and after this  if vendor click on any reconcile account itab2 to be display  only those record as per selected reconcile account further to this  on next screen  if user click on any vendor  system should disply the itab1  record as per selected vendor from second screen.
    regards,
      zafar

    Hi
    call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program       = sy-cprog
          i_callback_user_command  = 'USER_COMMAND' " This is also maintained below just check further down
          is_layout                = gs_layout
          i_callback_pf_status_set = 'SET_PF_STATUS' " This form is maintained below just check further down
          it_fieldcat              = gt_fieldcat[]
          i_save                   = gc_a
        tables
          t_outtab                 = ist_final[].
    form set_pf_status using rt_extab type slis_t_extab.        "#EC CALLED
      set pf-status 'ZPP_NCO_STATUS_PTEI' excluding rt_extab.
    endform.   
    form user_command using p_ucomm    type sy-ucomm            "#EC CALLED
                            wa_selfield type slis_selfield .    "#EC CALLED
      case p_ucomm.
    * When user clicks on the Download button
        when '&DOWNLOAD'. " after you double click check the sy-ucomm (it is ONLY to the best of my knowledge )
    " again  Use The ALV FM or continue with your coding here
    " wa_selfield  contains the Line along with the contents of values of First Tab you can check them in Debug.
    Similary continue with Third Internal Table
    endform.

  • What are the concepts of iPhone 5?

    I wanted to know the concepts of iPhone 5.

    Hi, where is your techincal support query? We, like you, are non-Apple staff, just users of Apple products. To discuss concepts behind Apple products, please contact Apple directly or visit their product pages.

  • Please Read!! Java coder's opinions wanted...

    Help:
    I need you to tell me what features your ideal source code editor (with some project management tools built in) would have. Tell me anything, however big, however infeasible, or however trivial.
    Background:
    I'm starting work this summer on a major project, set to last until the summer of 2004 (2 years), during the course of which I plan to develop an advanced text editor (with project management tools), written in Java, that will be built from the ground up differently from any other. It will be freeware on release.
    Features:
    The software will be able to handle HTML/XML/Java/Prolog/LISP/C/C#/Perl languages and plain text, and will support plug-ins for other languages.
    In the course of developing it, I want to experiment with novel features, built-in project management tools, support for numerous programming languages, different ways of viewing, editing and presenting the project/code, and the application of the latest AI research.
    I also want to build a 'concept' GUI (as in 'concept car), that will be rather unlike any other application around at the moment and will be designed from the start to follow all the latest theory on user psychology, behaviour and preferences.
    I have dozens of ideas for this, which sadly I need to keep mostly under wraps for the time being. However, this project is intended to create from scratch an entirely new text editor using user-centred design, and I need to know what all you novice and experienced users want.
    Timeline:-----------------------------------------------
    Prototypes expected by Xmas 2002.
    First beta likely to appear late Summer 2003.
    Successive betas to be followed by release
    candidates around about Xmas 2003.
    Final release to appear early Spring 2004.
    Update Summer 2004.
    (All these releases will be freeware)
    As you can tell from the schedule, this is a serious project, and I hope I can produce a piece of (initially) freeware that will benefit everyone...
    Thanks for the help!
    Martin Robbins
    UW Aberystwyth (UK).

    same as jgitnick's comments, but I also like the features where your objects are displayed in dropdowns along with properties and methods.
    version control and history are essential as are color coding identifiers, comments, etc... The version history should be easily accessable--I've used several tools that had versioning control, but then didn't let you access the history--what was the point?
    Ability to set tabs and tab characters replaced by spaces (spaces inserted instead of tabs) for each tab used--this lead to a 3am coding chrisis when I was in college because the tab character was not supported well as white space by a compiler we used for one semester.
    scope designator matching {} ()
    replaceable character sets (support for multiple human languages).

  • Concept of licensing in Oracle 11g

    I wanted to understand the concept of licensing in Oracle 11g. We have 1 licensed version of Oracle 11g which is used for production, I want to put up a test instance of Oracle DB also but am told that we have only 1 license.
    Please help me whether having an unlicensed copy could affect our audit process or any other consequences.
    I hope, my question is clear.
    Please revert with the reply to my query.
    Regards

    972145 wrote:
    I wanted to understand the concept of licensing in Oracle 11g. We have 1 licensed version of Oracle 11g which is used for production, I want to put up a test instance of Oracle DB also but am told that we have only 1 license.
    Please help me whether having an unlicensed copy could affect our audit process or any other consequences.
    I hope, my question is clear.
    Please revert with the reply to my query.
    RegardsTo Understand More About oracle License Contact oracle office In your Country , More Information Since its technical Forum Not Sales One .

  • Activate new g/l concept

    Hi gurus,
    in 6.0 ecc, there is a new g/l concept is there.  Present in our implementation we dont want new g/l concept.  How can we deactivate new g/l concept.
    thanqu
    raj

    Hi Raja,
    .Activate the New General Ledger Accounting by a single click on the clock icon
    2.You will reach to change view "activation of New GL A/cg" detail screen and tick the checkbox and save. If u deactivate that remove tick in that check box
    3. After activation of New General Ledger Accounting, you exit the IMG screen When you re-enter , you find that a new node is added Financial Accounting (New)
    4.After activation of New General Ledger Accounting , a new sub node appears in the IMG structure.
    Regards
    Surya

  • Need clarification on select query Urgent!!!!!

    Hi ,
    i want clarification about this query , because i want improve performence to report in ST05 it is showing 1,40,250 time so i need to do some thing on this please any body help me out.
    SELECT  matnr  werks  dispo
                 FROM   marc
                 INTO   TABLE  it_marc
                        WHERE  matnr  IN  s_matnr  AND
                               werks  IN  s_werks  AND
                               dispo  EQ  p_dispo.
        DESCRIBE TABLE it_marc  LINES w_lines.
        IF  w_lines  IS INITIAL.
          MESSAGE e518(zv) WITH p_dispo.
        ENDIF.
      ENDIF.
    thanks,
    murali.

    SELECT matnr
      FROM mara
      INTO TABLE it_mara
      WHERE matnr IN s_matnr.
    IF sy-subrc eq 0.
      SELECT matnr werks dispo
        FROM marc
        INTO TABLE it_marc
        FOR ALL ENTRIES IN it_mara
        WHERE matnr = it_mara-matnr
          AND werks IN s_werks
          AND dispo EQ p_dispo.
      DESCRIBE TABLE it_marc LINES w_lines.
      IF w_lines IS INITIAL.
        MESSAGE e518(zv) WITH p_dispo.
      ENDIF.
    ENDIF.
    I am sorry, but I comment also bad recommendations, if I find any. And the above example such
    a bad recommendation.
    SELECT matnr
      FROM mara
      INTO TABLE it_mara
      WHERE matnr IN s_matnr.
    The first select selects much more than you really need, while there is only a select single necessary.
      DESCRIBE TABLE it_marc LINES w_lines.
      IF w_lines IS INITIAL.
    It is also not necessary to count 1000 of lines, if you want to know whether there was at least one records, a check
    of a sy-subrc is much better. This should also be done in the original coding.
    As said above, check what is in s_matnr and s_werks and what is suppossed to come back.
    Siegfried

  • Concept on KM

    Hi
    Trying to clarify on KMs. When I import a KM from impexp folder ODI stores the information from the XML into work repositories tables?..
    I tried the following it worked.
    1) Imported IKM Oracle Incremental Update into my Project and created an interface to load oracle table.
    2) Romoved KM_IKM Oracle Incremental Update XML document from that folder and my interface is still valid and working.
    I was in the impression that everytime I run an interface ODI references the XML from that folder. It only stores the KM name in its repository. But looks like it stores the entire KM information in the work repository. Just want to get this concept clear. So if I make any changes to my KM through Designer those changes are only for that project? I have 3 projects (of-course imported KM 3 types) so I make any change to my KM I have to do that in all 3 projects separately?
    -app

    Hi app,
    Yes, once you imported KMs, ODI will stores the name/descriptions/steps/options and all contents of the KM in the metadata tables of your work repository. So it doesnt matter if you remove the KM from impexp folder after.
    You can have a glance in SNP_TRT( stores name of KMs,types. technology and more) and SNP_TXT( which stores the steps,descriptions and all)
    The above tables has refertials in rest of the metadata tables as such and will be looked up while executing a interface.
    Makes sense?
    Thanks,
    G

Maybe you are looking for

  • Time machine won't back up after Maverick install

    Installed Maverick today on macbook pro, then have been unable to back up to Time Machine to my Western Digital 3TB drive.  Last back up was successful just before install earlier today.  Time Machine Error "Files can't be copied onto the backup disk

  • Building Text variables - leading 0

    Hi I am having a problem with building text variables.  I start with a variable containing null, and do something like  Hint = Hint + "black and white animal" and the result is that Hint now contains 0black and white animal Is there any way around th

  • App Error 204 - Reset' (BB Torch 9810)

    Helloo.. I have been trying to resolve this error but no luck There's an error 'App Error 204 - Reset' appearing with whole white screen all of a sudden. I cannot access my phone as I click on Reset it reboots automatically and then shows the same er

  • Using arrays

    Hello I wanted to know if using the array method would be the most suitabe for creating a portfolio feature where clicking on thumbnail images would load outside swf's. thanks alot for helping mt

  • How do I create sections in page layout mode?

    The "section break" option is always greyed out in page layout mode. But I want to create a newsletter with a cover page and then the other three pages will have different headers and footers and I want repeating images on them. This would seem to be