Default Character Set using JSObject

Hi All,
This problem has been nagging me for a while and am now resorting to this forum for an answer.
I have a jsp page with an embedded applet. Inside the applet, I read the HTML page using JSObject.
The problem is when using the JSObject to get values of controls from the HTML page with Japanese characters.
The HTML page is encoded in UTF-8, however, when I get values from the controls using JSObject in the applet, the values returns as ???. Latin characters are supported but not Japanese characters. So.. I'm wondering what character set the JSObject supports when converting a Javascript string to a Java String.
The following code is executed:
          JSObject win = JSObject.getWindow(this);
          JSObject doc = (JSObject) win.getMember("document");
          JSObject forms = (JSObject) doc.getMember("forms");
     JSObject form = (JSObject)forms.getSlot(0);
          JSObject title = (JSObject)form.getMember("title");
String titleValue = (String)title.getMember("value");
I've also tried form.eval("document.forms[0].title.value") and that returns the same ??? for japanese characters.
Any ideas?
Kent

Hi Larry,
The characters that appear at the beginning of each file -  - is the BOM or byte order mark for UTF-8, which is automatically added to the file on creation. These files are UTF-8 encoded, to allow for the support of multi-byte characters. An updated version of the Exporter Tool removes these BOM characters. Please contact Support to obtain this updated version of the Exporter tool.
Alternatively, you can try the following:
If the character set of your Oracle database is not UTF-8, then you have two options:
1) If possible, change the character set of your database to UTF-8. To check the current database characterset, check the "NLS_DATABASE_PARAMETERS" table.
or
2) Open the generated .dat files using Notepad, then use the File | Save As menu option, and set the "Encoding" to ANSI, then save the file. The BOM will now be removed from the .dat files.
I hope this helps.
Regards,
Hilary

Similar Messages

  • UTF8 as system default character set

    Hi,
    I'm new to OSX and I moved to a new company few days ago. We work with Tiger workstations and servers, several Linux internet servers and Windows Laptops.
    One of the problems I have is to find a way to set UTF8 as the default character set for the system, not just user level preferences. That would solve many of my other problems.
    There is probably an easy way to do that?!!
    Any tip or trick would be greatly appreciated.
    Thanks.

    One of the problems I have is to find a way to set UTF8 as the default character set for the system, not just user level preferences. That would solve many of my other problems.
    What are your problems exactly? If you give some specifics, someone can probably help.
    Generally speaking Unicode UTF-8 is what OS X uses by default for a lot of things. The exception would be the file system, which uses UTF-16 NFD. There is certainly no way to change that.

  • System wide default character set

    Hi,
    I moved to a new company few days ago where we use Tiger workstations and servers.
    I've been trying to figure a way to set UTF8 as the default character set for a whole system, not just a user preference.
    I suppose there is a way to do that, but I'm afraid I won't have more time to find it.
    Any help is welcome.
    thx fred

    I've been trying to figure a way to set UTF8 as the default character set for a whole system, not just a user preference.
    If you could explain exactly why you think you need to do that, someone might be able to help.
    Generally speaking Unicode UTF-8 is what OS X uses by default for a lot of things. The exception would be the file system, which uses UTF-16 NFD. There is no way to change that.

  • Change default character set of JVM

    Is there a way to change the default character set of JVM to say, UTF-8?
    System.out.println("Default Character Set: " +  new java.io.OutputStreamWriter(new java.io.ByteArrayOutputStream()).getEncoding());
    System.out.println("File Encoding: " + System.getProperty("file.encoding")); On Windows
    ==========
    Default Character Set: Cp1252
    File Encoding: Cp1252
    On Linux
    ========
    Default Character Set: ASCII
    File Encoding: ANSI_X3.4-1968
    I would like to save on the effort of changing the many lines of code that looks like
       new BufferedWriter(new OutputStreamWriter(out)); to
       new BufferedWriter(new OutputStreamWriter(out, "UTF-8")); Thanks

    Try this:
    -Dfile.encoding=utf-8
    as vm argument.
    /Kaj

  • Change character set used to write a file in application server.

    Hello Experts,
                       I want to know if we can change the character set used to create a file in application server.(Is it posible to use a particular character set while creating a file in application server.
                      I will be very great full for any help.
    Thanks in advance.
    Sharath

    Hello Sarath,
    There is an extension CODE PAGE with OPEN DATASET stmt.
    Can you please elaborate which character set you want to write to the application server?
    BR,
    Suhas

  • [SOLVED] default character set in mousepad

    Is there a way to set the default character set in mousepad? I want it to always save in utf-8, but it defaults to iso-8859-1.
    It's a big pain when you're trying to save something that you've copied from a browser. I always have to go back and type the filename again (and change to utf-8) after getting the error message about not being able to save.
    Also, is there a way to set the default locale to utf-8 instead of iso-8859?
    Last edited by mrbug (2008-10-31 16:18:12)

    You put me on the right track; the problem was that I left the .utf8 part out of the LC_ALL= line in /etc/profile
    EDIT: Oops, accidentally put a - between utf and 8. That won't work!
    Last edited by mrbug (2008-10-31 16:25:35)

  • Need suggestion on Multi currency and Unicode character set use in ABAP

    Hi All,
    Need suggestion. In one of the requirement I saw 'multi-currency and Unicode character set experience in FICO'.
    Can you please elaborate me how ABAPers are invlolved in multi currency as I think this is FICO fuctional area.
    And also what is Unicode character set exp.? Please give me some document of you have any.
    Thanks
    Sreedevi
    Moderator message - This isn't the place to prepare for interviews - thread locked
    Edited by: Rob Burbank on Sep 17, 2009 4:45 PM

    Use the default parser.
    By default, WebLogic Server is configured to use the default parser and transformer to parse and transform XML documents. The default parser and transformer are those included in the JDK 5.0.
    The built-in WebLogic Server DOM factory implementation class is com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.
    The DocumentBuilderFactory.newInstance method returns the built-in parser.
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();

  • Default character set

    I installed the database 10.2.01 with basic installation (not advanced option).
    what is the default charater set in the basic installation?
    how to show character set in command line?
    Can I change it to AL32UTF8?
    like:
    SQL>alter database character set AL32UTF8;
    Thanks

    thanks.
    I'm using Linux
    So default character is "WE8ISO8859P1".
    But it seems I can not alter to AL32UTF8, which has the globalization support.
    SQL> select value from nls_database_parameters where parameter='NLS_CHARACTERSET';
    VALUE
    WE8ISO8859P1
    SQL> alter database character set AL32UTF8;
    alter database character set AL32UTF8
    ERROR at line 1:
    ORA-12712: new character set must be a superset of old character set
    ----------------------

  • Unrecognised Char in GB2312 character set using java InputStreamReader??

    Reading the following file chinese GB2312 html file from
    http://news.xinhuanet.com/local/2007-02/13/content_5732705.htm
    using the InputStreamReader with GB2312 encoding as shown below
    public class readGB2312html file
    //........TmpText declarations.....
    public static void main( String[] args )
    try
    FileInputStream is = new FileInputStream( args[0] );
    BufferedReader br = new BufferedReader(
    new InputStreamReader( is, "GB2312" ) );
    String strLine;
    while ( (strLine = br.readLine()) != null )
    TmpText.append(strLine);
    TmpText.append("\r\n");
    br.close();
    bw.close();
    catch ( Exception e )
    e.printStackTrace();
    The TmpText variable does not display the last character in the article properly (记者夏珺) it gives instead (记者夏?B)
    Inside the html file the unrecognised charcter is represented by �B in the html file Why is this so
    ���������B��
    In the internet browser it is displayed and recognised as a chinese GB2312 character why not recognised by Java InputStreamReader???
    Any help or explanation would be much appreciated

    Yes, it is not a GB2312 character
    The �B character is AC40 in hex format which is outside of the GB2312 character range, it is in GBK
    Copied from wikipedia,
    GBK is an extension of the GB2312 character set for simplified Chinese characters, used in the People's Republic of China.
    GB stands for National Standard, while K stands for Extension. GBK not only extended the old standard GB2312 with Traditional Chinese characters, but also with Chinese characters that were simplified after the establishment of GB2312 in 1981. With the arrival of GBK, certain names with characters formerly unrepresentable, like the "rong" (�g) character in former Chinese Premier Zhu Rongji's name, are now representable.
    Thanks a lot will use the GBK charset to read the file for all GB2312 file since it is a subset of it.

  • How can I see KSC5602 character set using JDBC thin driver

    After I change character set from USASCII7 to KO16KSC5601, I
    cannot see korean from the clients
    using JDBC thin driver.
    But, I can see korean clearly using sqlplus at serer, or
    application using SQLNet.
    I use Oracle Enterprise Server 8.0.4.1.0, jdbc thin driver
    8.0.4.0.6 on Windows 98. I read that all bugs realated
    to multibyte language are fixed in Oracle8. What can I do to
    solve this problem?
    PS.server: Oracle 8.0.4.1 on Digital Unix 4.0b, client: jdk1.1.8
    on Windows98. I used the command.
    null

    The easiest thing to do is download it as an archive with your applet.
    Otherwise, you have to have the files on every client machine.
    For netscape, put the classes111.jar in the java classes folder typically:
    c:\ProgramFiles\Netscape\Communicator\Program\java\classes.
    I'd expect that IE would be setup in a similar way.

  • What affects the default character set environment of JVM?

    For Example, String.getBytes(); since not specify the characterset, so will use the system default characterset. what is this system default characterset affected by? I have tried in Linux Platform, which is LANG environment variable. Is this right? What about other platforms?
    And also, are there some JVM parameters can override the default settings of system default characterset? I have tried -Dfile.encoding but found no effect.
    Thanks!

    Hi,
               I guess it can be Uni CODE.
    Regards
    Prashant

  • How do i change the default character set?

    I'm from Brazil, and here we have special characters like "�", "�", "�", etc.
    I need the JVM to understand that from the database and print it correctly on my page (I'm using servlets).
    How do i do that?
    thanks to all.

    java works just fine with Brazilian characters....I
    should know I developed software for a brazilian
    company for the last 5 years using java.
    Ok. I believe you do. I just wanna know how. i'm using servlets. So, to print out the page, i use.
    PrintWriter out = response.getWriter();
    out.println("some_text");
    out.println(resultset.getString("some_field"));
    If "some_text" contains special characters, they are printed correctly. No problem about that.
    the problem is when the string from the database/resultset has special characters. Those aren't printed correctly. And that's what i want to fix.
    Any suggestions?

  • Character set in MDL export/import

    Hi,
    we are running OWB 10.1.0.2. In order to get version control, we perform MDL exports of collections from our development environment and then import them into our test and production environments. Each environment uses its own design repository, but all repositories are in the same database.
    When doing an export of a collection, we always specify the character set AL32UTF8 because that is what we are running in the repository database. When later doing an import using the graphical user interface, it is not possible to specify the character set (but this can be done when using the import utility). According to the documentation, the GUI import will then assume that the character set in the collection is the character set of the client, which usually is WE8MSWIN1252. (The documentation also says that it IS possible to specify the character set during GUI import, this is obviously a documentation error).
    My questions are: What is the point of specifying character set when doing exports and imports? Could an AL32UTF8 export followed by an WE8MSWIN1252 import cause problems? I assume that the character set used by export is specified in the collection file, so does the import then convert it to WE8MSWIN1252 (or the character set specified in the import utility)?
    Or, to be more general: What is actually happening with the character sets during MDL export/import?
    /Kjell Gullberg

    Dear ski123,
    I think you are not going to loose any data of yours when you migrate the database. You may proceed to the import.
    Please find below documentations;
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14196/install003.htm#sthref81
    For Database Character Set, select from one of the following options:
        *Use the Default—Select this option if you need to support only the language currently used by the operating system for all your database users and your database applications.
        *Use Unicode (AL32UTF8)—Select this option if you need to support multiple languages for your database users and your database applications.
        *Choose from the list of character sets—Select this option if you want the Oracle Database to use a character set other than the default character set used by the operating system.Choosing a Character Set;
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14225/ch2charset.htm#NLSPG002
    AL32UTF8;
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14225/glossary.htm#sthref2039
    Hope That Helps.
    Ogan

  • Export using UTF8 character set

    Hi,
    My client is having a production database with default character set.
    While exporting I need to export the database to create a dump with UTF8 character set.
    Please let me know how to export with UTF8 option.
    Thanks....

    Hi, I am not sure if I got you correst. Here is what I think I have understood:
    - your client has a db which uses UTF8 as character set.
    - you want to export and make sure that there is no conversion taking place.
    for this you must set NLS_LANG variable in the shell from where you call exp, resp. expdp properly.
    NLS_LANG is composit and consists of:
    NLS_LANGUAGE_NLS_TERRITORY.NLS_CHARACTERSET
    In a bash this would look like this:
    $ export NLS_LANG=american_america.UTF8
    In other shells you might need to first define the varaible and then export:
    $ NLS_LANG=american_america.UTF8
    $ export NLS_LANG
    What you also need to know is that you influence the behavior for decimal separator and grand separator in numeric values and a few more settings by specifying NLS_TERRITORY.
    For instance NLS_TERRITORY uses a "." as decimal separator and a "," as grand separator for numeric values.
    This can be a pitfall! If you have the wrong territory specified then it might destroy all you numerics!
    Hope this helps,
    Lutz

  • Data load uses wrong character set, where to correct? APEX bug/omission?

    Hi,
    I created a set of Data Load pages in my application, so the users can upload a CSV file.
    But unlike the Load spreadsheet data (under SQL Workshop\Utilities\Data Workshop), where you can set the 'File Character Set', I didn't see where to set the Character set for Data Load pages in my application.
    Now there is a character set mismatch, "m³/h" and "°C" become "m�/h" and "�C"
    Where to set?
    Seems like an APEX bug or at least omission, IMHO the Data Load page should ask for the character set, as clients with different character sets could be uploading CSV.
    Apex 4.1 (testing on the apex.oracle.com website)

    Hello JP,
    Please give us some more details about your database version and its character set, and the character set of the CSV file.
    >> …But unlike the Load spreadsheet data (under SQL Workshop\Utilities\Data Workshop), where you can set the 'File Character Set', I didn't see where to set the Character set for Data Load pages in my application.
    It seems that you are right. I was not able to find any reference to the (expected/default) character set of the uploaded file in the current APEX documentation.
    >> If it's an APEX omission, where could I report that?
    Usually, an entry on this forum is enough as some of the development team members are frequent participants. Just to be sure, I’ll draw the attention of one of them to the thread.
    Regards,
    Arie.
    ♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    ♦ Author of Oracle Application Express 3.2 – The Essentials and More

Maybe you are looking for

  • Error during distribution for compiled codegeneration

    Hi, I'm doing application distribution for my application using a fscript script and am forcing compilation on 2 of my partitions. This I have been doing from quite sometime successfully. Recently I developed a new service and plugged it into my appl

  • Don't want zip files as attachments

    Sometimes a document such as Word or Excel will appear as a zip in my message when I attach it. I do not want to send a zip file. How can I stop Apple from converting it? I have an iBook G4 with Tiger. Yahoo says they are not doing it, problem is cau

  • Help! No Sou

    I'm very very confused/pi**ed off at the moment. For some reason, my European Creative Zen Touch is not making any sound. I turned it on, selected the song and put the headphones in and great, nothing! Not a thing. I have tried different songs, reset

  • I need a smart person...

    I need to talk to a person that knows A LOT about iPod Touches...

  • Exporting HDV to Small Quicktime Movie

    I need to export an HDV sequence (1440x1080) to a 320x240 Quicktime movie. Can anyone please help me on how I can export this and maintain the aspect ratio. I have tried to export it using the Quicktime conversion, but it comes out squished. Any tips