Setting the character set

Hey all,
i am serializing some objects to a file, sending the file to a server and then deserializing the objects there...
all my objects are of the type of the following Word class :
public class Word {
     String source;
     String translation;
     public Word (){
          this.source=null;
          this.translation=null;
     public Word ( String source, String translation){
          this.source=source;
          this.translation=translation;
     public String getSource(){
          return source;
     public String getTranslation(){
          return translation;
     public void setSource(String source){
          this.source=source;
     public void setTranslation(String translation){
          this.translation=translation;
}i have another class which makes word objects and sets data to them before serializing them to a file... How can i insert strings of different character sets? for example if the word class is used for translation the source attribute may be in English and the translation in Greek... how can i save these data to the object and then to the file without having conflicts with the character set..?
thx!

Start a reply and look for "Add images" below the text entry box here on this thread.
Automatically generated email messages tend to suffer in this way; they are often generated by scripts (rather than by proper email clients) and don't adhere closely to the accepted standards for email communications.
They probably look fine in Apple's Mail. Why would they expect you to use anything else? ;-)

Similar Messages

  • How to set the character set to default

    Hi All,
    How to set the character set default to Simplified Chinese(GB2312), current we need change it every time.
    Thanks in advance.

    Hello Michael,
    when we log in SAP in ZH language the character set is getting defaulted to Simplified Chinese(GB2312). But currently the log in Language is in EN and hence the character set to be defaulted to Simplified Chinese(GB2312).
    Also please let me know where is the option for GUI setting?
    Thanks Again in Advance.

  • How can i set the character set ???

    hello
    now i have the following
    Message msg =
    new MimeMessage(Session.getDefaultInstance(props, null));
    how can i set the character set to be 'windows-1256'
    pleaze help if u can
    thanks very much
    Belal

    You have to deal with the NLS_LANG environment variable,it is defined as NLS_LANG=<Language>_<Territory>.<clients characterset> .
    Where is your oracle client installed? On the the server machine, where the database resides , on another Unix system or is it a Windows client? On Windows NLS_LANG is directly related to the OS settings and stored in the registry, on Unix NLS_LANG is not set automatically and defaults (if not set) to AMERICAN_AMERICA.US7ASCII. If you are working on UNIX, this could be the reason for disordering. I'm not familiar with Chinese, so I don't know the correct setting , but a good approach would be same setting as on the server.
    Metalink note 158577.1 describes NLS_LANG very detailed.

  • Precautions i need to take when changing the Character set

    Hi,
    ORACLE VERSION: 10G Release 1 (10.1.0.3.0)
    I am going to change my database's characterset from AL32UTF8 to WE8MSWIN1252 character set and AL16UTF16 NCHAR character set. So i have few questions for you.
    1. What is the difference between Character Set and National Character set? Do i have to set both?
    2. What are precautions that i need to take while changing the characterset?
    3. What are JOB_QUEUE_PROCESSES and AQ_TM_PROCESSES parameters in Plain English? Why do i have to set these parameters to 0 as mentioned in this post below.
    Storing Chinese in Oracle Database

    1) The database character set controls (and specifies) the character set of CHAR & VARCHAR2 columns. The national character set controls the character set of NCHAR & NVARCHAR2 columns.
    2) Please make sure that you read the section of the Globalization manual that discusses character set migration. In particular, going from UTF-8 to Windows-1252 is going to require a bit more work since the latter is a subset (and not a strict binary subset) of the former.
    Justin

  • How to get the character set which i want it to be?

    i confront a problem, when using jdbc to connect to oracle8i database on solaris; because i use getBinaryStream() to read from db in "byte" reading, seemly it would use default character set on OS or database(such as EUC,etc.), not which the client i want it to be. is there anyway to take control of such code writing(i mean to change the character set when i get byte out of database, thus the byte would use NLS_LANG the same as using sqlplus setting in user env)?

    First of all read Note 581312 - Oracle database: licensing restrictions:
    As of point 3, it follows that direct access to the Oracle database is only allowed for tools from the areas of system administration and monitoring. If other software is used, the following actions, among other things, are therefore forbidden at database level:
    Creating database users
    Create database objects
    Querying/changing/creating data in the database
    Using ODBC or other SAP external access methods
    Are you trying this on the database server itself? If yes, then you need to install the hebrew codepages as well as hebrew fonts in order to display the data correctly.
    Markus

  • How to define the character set of an outbound EDI batch in BizTalk 2010?

    I have some EDIFACT files with a character set of UNOC though lowercase strings and umlaute should be allowed. These files should be batched in an outbound EDIFACT file. But the batching orchestration of the related send port throws some validation errors.
    If I convert the strings to uppercase characters everything's working fine. So it seems that the outbound batching orchestration uses the UNOA character set internally for the validation of the EDIFACT files...
    How can I change the character set of the outbound batching orchestration in BizTalk 2010? No settings found regarding the character set of outbound batching orchestration in the party and agreement configuration so far. Thank you

    Hi Philipp,
    To define a character set in EDIFACT,
    UNA segment is used. After defining see, How Validation of an EDI Interchange Is Configured and Outbound
    EDI batching in BizTalk Server 
    Maheshkumar S Tiwari|User
    Page | http://tech-findings.blogspot.com/

  • Website not displaying correctly. Firefox is changing the character set to Western (ISO-8859-1) automatically.

    Normally I have set Firefox (or it's set by default) to Character Set Unicode (UTF-8) and everything displays perfectly. I've never had a problem before.
    Now however, whenever I upload my own website, for some bizarre reason on that particular tab (and only that tab) the Character Set is changed over to Western (ISO-8859-1) and then there's a few characters within my site that do not display correctly, namely apostrophes and hypens.
    It definitely isn't my software (Serif WebPlus X4) because the page displays correctly in every other browser. Plus it displays correctly in Firefox if I change the Character set back to Unicode.
    PS The site is a work in progress

    That happens because the server sends a content-type (<b>text/html; charset=ISO-8859-1</b>) via the HTTP response headers and in that case that content type prevails. The page code is saved with an UTF-8 byte order mark () that you see in this case.
    *http://web-sniffer.net/?url=http%3A%2F%2Fwww.valuevisionglasses.co.uk&http=1.1&gzip=yes&type=HEAD&uak=0
    *http://httpd.apache.org/docs/current/mod/mod_mime.html#AddType

  • Oracle xml_dom.writeToClob ignore the character set

    I'm trying to generate a xml file using oracle. After generating the xml using dbms_xmldom, it is stored in a CLOB and later written to a table.
    The problem is that the character set ('UTF-8') is not included in the header even though it is specified using setCharset() procedure.
    Following is the oracle script,
    declare
    export_file_ CLOB ;
    str_export_file_ xmldom.DOMDocument;
    main_node xmldom.DOMNode;
    root_node xmldom.DOMNode;
    root_elmt xmldom.DOMElement;
    begin
    str_export_file_ := xmldom.newDOMDocument;
    xmldom.setVersion(str_export_file_, '1.0');
    xmldom.setCharset(str_export_file_ , 'UTF-8');
    main_node := xmldom.makeNode(str_export_file_);
    root_elmt := xmldom.createElement(str_export_file_,'TextTranslation');
    xmldom.setAttribute( root_elmt, 'version' ,'1.0');
    xmldom.setAttribute( root_elmt, 'language' ,'ja');
    xmldom.setAttribute( root_elmt, 'module' ,'DEMOAND');
    xmldom.setAttribute( root_elmt, 'type' ,'VC');
    root_node := xmldom.appendChild(main_node, xmldom.makeNode(root_elmt));
    export_file_ :=' ';
    xmldom.writeToClob( str_export_file_,export_file_,'UTF-8');
    dbms_output.put_line ( export_file_ );
    end;
    The output is ,
    <?xml version="1.0"?>
    <TextTranslation version="1.0" language="ja" module="DEMOAND" type="VC"/>
    If anybody can suggest me what I have done incorrectly that will be great.
    Thanks in advance.

    The character set you specify via setCharset() procedure is ignored unless you use writeToFile() later.
    http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_xmldom.htm#CHDCGDDB
    Usage Notes
    This is used for WRITETOFILE Procedures if not explicitly specified at that time.You can also use something like this :
    SQL> set serveroutput on
    SQL>
    SQL> declare
      2 
      3   export_file  clob;
      4   prolog       clob := '<?xml version="1.0" encoding="UTF-8"?>';
      5 
      6  begin
      7 
      8    select prolog || chr(10) ||
      9           xmlserialize(document
    10             xmlelement("TextTranslation"
    11             , xmlattributes(
    12                 '1.0' as "version"
    13               , 'ja'  as "language"
    14               , 'DEMOAND' as "module"
    15               , 'VC' as "type"
    16               )
    17             )
    18             indent
    19           )
    20    into export_file
    21    from dual ;
    22 
    23    dbms_output.put_line ( export_file );
    24 
    25  end;
    26  /
    <?xml version="1.0" encoding="UTF-8"?>
    <TextTranslation version="1.0" language="ja" module="DEMOAND" type="VC"/>
    PL/SQL procedure successfully completed

  • Changing the character set in RoboHelp 7 file converted from 5

    The character set of the output files for WinHelp defaults to
    utf-8. How can the default be set to windows-1252 per project or
    for all projects in RoboHelp 7?

    This is related to the posting - "RoboHelp 7 (with patch) IE6
    does not display popup field definitions". Somewhere in our
    environment the character set is getting changed to western
    european (ISO) for the pages that do not load initially in IE6/XP
    from the OAS even though the code generated by RoboHelp is utf-8.
    The WebHelp generated in RoboHelp v5 has a characterset of
    windows-1252. None of the pages with the character set of
    windows-1252 have a problem loading (or changing the character
    set). The problem may be on the OAS or the single signon
    layer.

  • How to change the character set?

    Platform is win2000 and oracle 8.17. I need to write data in Bulragian. Automatic character converter in oracle didn't work! Database is created already!
    Is there any function in pl/sql or Java that can convert character set in cl8mswin1251? When I read the data from database there are only ?????
    Thank you in advance!

    I'm not sure what you're asking here. "Will it be ok" for what?
    Assuming
    - you read the chapter I linked to,
    - ran the character set scanner,
    - the character set scanner indicated that all your existing data is properly encoded ISO 8859-1
    - the character set scanner indicated that all the ISO 8859-1 data could be converted to Windows-1252
    - all the national character set data was properly encoded in whatever national character set the database had
    - you did the export properly
    - you did the import properly
    - your client NLS_LANG settings are all correct
    then sure, everything should be OK.
    If you skipped one of these steps, I would again strongly encourage you to read the chapter I linked to originally as well as the Metalink article others have pointed you to.
    Justin

  • How to change the character set of the D/b

    Hello All,
    When i issue the command
    ALTER DATABASE CHARACTER SET UTF8
    It gives me the error that I can only change the character set to a superset of the existing character set.
    Is there any way i can change the character set without recreating the database.
    TIA
    Naveen

    The existing character set is the basis for the new character set. This is fair enough, because the character set determines how the actual data is stored in the database. Allowing new characters is a minor change: completely re-encoding your entire database is not.
    I'm afraid export, recreate and import is your only option.
    Cheers, APC

  • How to change the character set encoding not being a superset one

    HI, i have a fresh installed database, but i realize the character set support in my client is not good enough, since its a not production database i want to change the character set encoding to anothor one not being a superset of the old one.
    I have tried the "ALTER DATABASE CHARACTER SET WE8MSWIN1252" but it fails claiming i need a superset one.
    I guess its just a single steps to do it, i have all the privileges, just not the time to reinstall and setup everything.

    Do you know what that does to the existing data, though? My hunch would be that any characters which have a different binary representation in the source & target character sets would be corrupted.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to change the Character Set from AL32UTF8 to WE8DEC

    Hello!!
    I want to know how to change the character set in the database from AL32UTF8 to WE8DEC.
    I tried to use the comand ALTER DATABASE CHARACTER SET but I got an error because WE8DEC is not a superset of AL32UTF8.
    I need to import tables from a server that uses WE8DEC. So when I do the import to my server, wich has AL32UTF8 , I can't import the rows that include an Ñ.
    So I want to change the caracter set to WE8DEC. How can I do it?
    Is it needed to change the language configuration? The remote server has AMERICAN_AMERICA, and my server has MEXICAN SPANISH_MEXICO (both uses text in spanish).
    Thanks a lot!!

    When you export from WE8DEC server what did you use
    for NLS_LANG char set? And when importing?
    The export was done in another computer because I can't do the export in the server (I have 10g, and the remote server has 9i and the export is not working). In my server, when I tried to do the import, the NS_LANG value was MEXICAN SPANISH_MEXICO.WE8MSWIN1252.
    When I try to import to my database I got the error:
    import done in WE8DEC character set and AL16UTF16 NCHAR character set
    import server uses AL32UTF8 character set (possible charset conversion)
    export client uses WE8MSWIN1252 character set (possible charset conversion)
    . importing USRMCR06's objects into PRIMARIZACION
    . . importing table "CHG_FONDOS_MARZO_CD_MOR"
    IMP-00019: row rejected due to ORACLE error 12899
    IMP-00003: ORACLE error 12899 encountered
    ORA-12899: value too large for column "PRIMARIZACION"."CHG_FONDOS_MARZO_CD_MOR".
    "NOMBRE" (actual: 41, maximum: 40)
    Column 1 16623436
    Column 2
    Column 3 Pymes_1
    Column 4

  • Problem : "You cannot convert the character set"..Any suggestions?

    Hi All,
    I have this character inside my internal table, KOÇTA&#350; YAPI MARK.T&#304;C A.&#350;. and it created a short dump on the program and it says "You cannot convert the character set". But this customer is already maintained inside the table KNA1..
    The code is like this one:
    REPLACE ALL OCCURRENCES OF '€' IN linebuffer WITH 'EUR'.
    TRANSFER linebuffer TO filename. "LENGTH bytes_to_transfer.
    the LINEBUFFER here is an internal table.
    I think conversion is the key here. Do anyone knows how to convert this thing? Or is it the Unicode system?  Could someone please help me to my problem?
    Thanks so much guys!
    Regards,
    Mackoy

    Hi,
    What i feel here is you are trying to pass  totla internal table at once.Internal table may have more than one record.Filename may string which can contain one row.
    So instead of that put the internal table into LOOP.
    DATA : v_string(200).
    LOOP AT  LINEBUFFER.
    Here your internal table may have non char data type.That is the
    main problem.
      Note : while concatenating all non char fields of LINEBUFFER
               should move to first to temporary char field and conatenate it
    CONCATENATE  LINEBUFFER-field1 LINEBUFFER-field2
      INTO  v_string.
    ENDLOOP.

  • Find out the character set of a database

    Hi,
    I need to know the character set of a database. I don't know which command or utility can I use.
    Thanks

    This forum is for Oracle Repository.
    However, connect as system and run
    select * from nls_database_parameters
    you should see the nls info.

Maybe you are looking for

  • P965 Neo-F Support for Q6600 Quad Core?

    Will it work with current 1.9 BIOS or not? Can't seem to find any definitive answers using 'search' Thanks, Glenn

  • Generating a blank document with custom code

    Is there a way I can generate a blank document with custom code in it?  I have been looking at several methods of doing this but so far I have been unsuccessful.  So any assistance here would be appreciated.  This is for an extension I am currently w

  • When is 11g R1 release expected?

    Gentlemen, Our development team is anticipating the upcoming 11g R1 release as it would resolve a couple of issues which we are facing. Any information on the release date would be helpful. Cheers, Sumanth

  • Leopard unusable

    If you have not upgraded yet, count yourself lucky. This OS is unusable for anyone in software development. It is unstable, slow, memory-hungry, drive-intensive and generally unsuitable for use. I have been an Apple developer since the Lisa, but this

  • Won't print from port cn25u3501f05px

    Printer won't print. Can't delete "what's printing" item-tried cancelling, deleting, pausing and restarting, turning off printer, even unplugging printer and repluging it in. The port is cn25u3501f05px, but I don't know if that means anything.   This