STRANS encoding in UTF-8

I do a simple transformation of some data and receive an XML. The encoding of this XML is
<?xml version="1.0" encoding="ISO-8859-1"?>
The client wants encoding UTF-8 however.
How can I transform with this encoding?
regards, Léon Hoeneveld

Hi,
by using of Standard xml anonymizer bean
Receiver communication channel -->  Module tab --> enter the following data
Module Name = AF_Modules/XMLAnonymizerBean
Module Type = Local Enterprise Bean
Module key = 0
Module Configuration
anonymizer.acceptNamespaces = ABC.interface if
anonymizer.encoding =  UTF-8
anonymizer.quote = '
please refre below blog,
http://wiki.sdn.sap.com/wiki/display/XI/ChangingNamespacesandtheencodingformatof+XML
regards,
ganesh.

Similar Messages

  • How do I supress the encoding of UTF-8 characters in a f:param element

    Hello,
    I have a keyboard displayed on my page, which won't work properly because of the used german characters.
    I have an icon for every button embedded in a link, which adds the selected character to the searchstring.
    For example adding an a works like this:
    from keyboard.xhtml:
    <s:link><f:param name="#{keyname}" value="#{keyword}a"/><h:graphicImage value="key_a.png"/></s:link>keyname and keyword are parameters submitted by the including form:
    from myform.xhtml:
    <ui:param name="keyword" value="#{end}"/>
    <ui:param name="keyname" value="end"/>This works great as long as the character is a standard one, but on as soon as I have a german umlaut in the string, the umlaut gets encoded/escaped with every single character that i add to the searchstring:
    The string makes it's way correctly to the keyboard-template, I can use a h:outputText to show it on the page and it doesn't get escaped.
    So, how can I prevent the escaping of my characters in the f:params elements?
    I really need to get this to work. so any hint or even solution would be fabulous.
    Thanks in advance, Peter
    PS: maybe my web server is doing something nasty, so it would be nice, if someone can check this code:
    <s:link><f:param name="test" value="�"/>INIT</s:link><br/>
    <s:link><f:param name="test" value="#{test}"/>REPEAT</s:link><br/>
    INFO: <h:outputText value="#{test}" /><br/>here is the same one with h:outputLink
    <h:outputLink><f:param name="test" value="�"/>INIT</h:outputLink><br/>
    <h:outputLink><f:param name="test" value="#{test}"/>REPEAT</h:outputLink><br/>
    INFO: <h:outputText value="#{test}" /><br/>EDIT: I found the solution, it was my beloved jboss application server, after adding a parameter to the server.xml, everything worked as expected:
    use page settings:
    <Connector port="8080" .....
    useBodyEncodingForURI="true" ..../>hardcoded:
    <Connector port="8080" .....
    URIEncoding="UTF-8" ..../> Edited by: pete007 on Mar 12, 2008 1:47 PM

    "Encoding" refers to the charset used to convert the Unicode data into bytes. But since you're writing to a String, you aren't converting the data to bytes and therefore UTF-16 is the appropriate encoding. It doesn't make sense to ask for your data to be encoded in UTF-8 when you aren't producing bytes.
    You could read this tutorial about XML and Unicode and encodings for more information:
    http://skew.org/xml/tutorial/

  • When creating new table in sqllite db via Flex it become encoded as "utf-16le"

    Hi Guys
    I have some annoying problem with my AIR application
    The application is communicating with a local DB (sqllite).
    as part of initial installation I'm checking if the db exist.
    in case not then:
    I create one (file)
    create the relevent tables inside
    and populate them.
    For some reason, on the tables creation step the sqllite db become encoded as UTF-16le instead of UTF-8.
    The question is how can I make the tables creation step to leave the db as UTF-8
    thanks in advance for your help.
    This is my creation code
    the "connection" is from flash.data.SQLConnection type
    The "file" contain the following information
    <sql>
    <statement>
    CREATE TABLE IF NOT EXISTS MYTABLE
          MYTABLE_VERSION                NUMBER NOT NULL,
           MYTA|BLE_INSERT_DATE                 DATE NOT NULL
    </statement></sql>
    The below is the relevent code:
    var stream:FileStream = new FileStream();
                stream.open(file, FileMode.READ);
                var xml:XML = XML(stream.readUTFBytes(stream.bytesAvailable));
                stream.close();
                var statement:XML = null;
                try
                    connection.begin(lockType);
                    for each (statement in xml.statement)
                        var stmt:SQLStatement = new SQLStatement();
                        stmt.sqlConnection = connection;
                        stmt.text = statement;
                        stmt.execute();           
                } catch(err:Error)
                    connection.rollback();
                    throw err;
                connection.commit();

    It doesn't look like you're using DBSequence domain for the OrderLinesId attribute. If you are then you do not need to fill in the sequence as you've done in the create method.
    Getting back to create issue, You may want to set the 'order' id (foreign key) values before calling super and then call the getOrder() (or getXXX where XXX is the order accessor in this entity) method to verify if the order of the given ID exists/found in the cache.
    By the way, are you also using a similar create() in order with DBSequence as the type for the pK and you force a sequence value on top of it via setAttribute?
    Yes, this is the create method inside CrpOrderLinesImpl.java
    protected void create(AttributeList attributeList) {
    super.create(attributeList);
    SequenceImpl s = new SequenceImpl("CRP_ORDER_LINES_ID_SEQ", getDBTransaction());
    setAttribute("OrderLinesId",s.getSequenceNumber());
    Thanks,
    Brad

  • XML encoding to UTF-8 charset - Oracle 9i

    Hi Masters
    Database Version : 9i
    Can you please help me here.. I am in a process of writing an Inventory Adjustment tool that will generate the XML and encode it to utf-8 charset…
    I have successfully written the code to generate the XML in this format
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <InvAdjustDesc>
    <dc_dest_id>323</dc_dest_id>
    <InvAdjustDtl>
    <item_id>12345678</item_id>
    <adjustment_reason_code>383</adjustment_reason_code>
    <unit_qty>4</unit_qty>
    <from_disposition>ATS</from_disposition>
    <to_disposition/>
    <user_id>e7062159</user_id>
    <create_date>
    <year>2012</year>
    <month>10</month>
    <day>29</day>
    <hour>14</hour>
    <minute>59</minute>
    <second>25</second>
    </create_date>
    <ww_liability_code>353</ww_liability_code>
    <ww_ref_1/>
    <ww_ref_2/>
    <ww_tran_id>25863399875</ww_tran_id>
    <ww_alloc_no/>
    <ww_final_store>353</ww_final_store>
    </InvAdjustDtl>
    </InvAdjustDesc>
    And now as part of the AIT requirement this XML needs to be encoded to utf-8 and look like this
    <?xml version="1.0" encoding="UTF-8"?><RibMessages><ribMessage><family>InvAdjust</family><type>INVADJUSTCRE</type><id>54601557</id><ribmessageID>3</ribmessageID><publishTime>2012-10-29 15:03:12.000 SAST</publishTime><messageData>&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot; ?&gt;&lt;InvAdjustDesc&gt;&lt;dc_dest_id&gt;323&lt;/dc_dest_id&gt;&lt;InvAdjustDtl&gt;&lt;item_id&gt;12345678&lt;/item_id&gt;&lt;adjustment_reason_code&gt;383&lt;/adjustment_reason_code&gt;&lt;unit_qty&gt;4&lt;/unit_qty&gt;&lt;from_disposition&gt;ATS&lt;/from_disposition&gt;&lt;to_disposition/&gt;&lt;user_id&gt;e7062159&lt;/user_id&gt;&lt;create_date&gt;&lt;year&gt;2012&lt;/year&gt;&lt;month&gt;10&lt;/month&gt;&lt;day&gt;29&lt;/day&gt;&lt;hour&gt;14&lt;/hour&gt;&lt;minute&gt;59&lt;/minute&gt;&lt;second&gt;25&lt;/second&gt;&lt;/create_date&gt;&lt;ww_liability_code&gt;353&lt;/ww_liability_code&gt;&lt;ww_ref_1/&gt;&lt;ww_ref_2/&gt;&lt;ww_tran_id&gt;25863399875&lt;/ww_tran_id&gt;&lt;ww_alloc_no/&gt;&lt;ww_final_store&gt;353&lt;/ww_final_store&gt;&lt;/InvAdjustDtl&gt;&lt;/InvAdjustDesc&gt;</messageData><customFlag>F</customFlag></ribMessage></RibMessages>
    I am not quite familiar with xml encoding do you have any suggestion on how i can accomplish this?
    Thanks

    Hi Odie
    I found a way of writing the encoded xml thanks for your help my man, much appreciated...
    But now can you help me here this xml I am generating needs to be like the one at the bottom...
    Here is my SQL I am using....
    SELECT XMLELEMENT
    ("InvAdjustDesc"
    ,XMLFOREST
    (inv.dc_dest_id AS "dc_dest_id"
    ,XMLFOREST
    (NVL(inv.item_id, ' ') AS "item_id"
    ,NVL(inv.adjustment_reason_code, ' ') AS "adjustment_reason_code"
    ,NVL(inv.unit_qty, 0) AS "unit_qty"
    ,NVL(inv.from_disposition, ' ') AS "from_disposition"
    ,NVL(inv.to_disposition, ' ') AS "to_disposition"
    ,NVL(inv.user_id, ' ') AS "user_id"
    ,XMLFOREST(TO_CHAR(SYSDATE, 'yyyy') AS "year"
    ,TO_CHAR(SYSDATE, 'mm') AS "month"
    ,TO_CHAR(SYSDATE, 'dd') AS "day"
    ,TO_CHAR(SYSDATE, 'hh') AS "hour"
    ,TO_CHAR(SYSDATE, 'mi') AS "minute"
    ,TO_CHAR(SYSDATE, 'ss') AS "second"
    ) AS create_date
    ,NVL(inv.ww_liability_code, ' ') AS "ww_liability_code"
    ,NVL(inv.ww_ref_1, ' ') AS "ww_ref_1"
    ,NVL(inv.ww_ref_2, ' ') AS "ww_ref_2"
    ,NVL(inv.ww_tran_id, ' ') AS "ww_tran_id"
    ,NVL(inv.ww_alloc_no, ' ') AS "ww_alloc_no"
    ,NVL(inv.ww_final_store, ' ') AS "ww_final_store"
    ) AS InvAdjustDtl)) AS InvAdjustDesc
    FROM invadjust inv
    WHERE inv.dc_dest_id = 342
    and rownum <= 3;
    I need to have a leading <InvAdjustDesc> with a node <dc_dest_id> with repeating <InvAdjustDtl>
    I did try to put XMLAGG to group all of my <InvAdjustDtl> nodes but the output I get is two entries of <InvAdjustDtl> as follows
    <InvAdjustDesc>
    <dc_dest_id>323</dc_dest_id>
    <INVADJUSTDTL>
    <InvAdjustDtl>
    <item_id>20144791</item_id>
    <adjustment_reason_code>6</adjustment_reason_code>
    <unit_qty>-4</unit_qty>
    <from_disposition>ATS</from_disposition>
    <to_disposition />
    <user_id>r7052891</user_id>
    <CREATE_DATE>
    <year>2012</year>
    <month>10</month>
    <day>31</day>
    <hour>10</hour>
    <minute>15</minute>
    <second>44</second>
    </CREATE_DATE>
    <ww_liability_code>342</ww_liability_code>
    <ww_ref_1 />
    <ww_ref_2 />
    <ww_tran_id>342021751178</ww_tran_id>
    <ww_alloc_no />
    <ww_final_store>342</ww_final_store>
    </InvAdjustDtl>
    <InvAdjustDtl>
    <item_id>6009173222220</item_id>
    <adjustment_reason_code>6</adjustment_reason_code>
    <unit_qty>-1</unit_qty>
    <from_disposition>ATS</from_disposition>
    <to_disposition />
    <user_id>r7052891</user_id>
    <CREATE_DATE>
    <year>2012</year>
    <month>10</month>
    <day>31</day>
    <hour>10</hour>
    <minute>15</minute>
    <second>44</second>
    </CREATE_DATE>
    <ww_liability_code>342</ww_liability_code>
    <ww_ref_1 />
    <ww_ref_2 />
    <ww_tran_id>342021751179</ww_tran_id>
    <ww_alloc_no />
    <ww_final_store>342</ww_final_store>
    </InvAdjustDtl>
    <InvAdjustDtl>
    <item_id>2034180000008</item_id>
    <adjustment_reason_code>6</adjustment_reason_code>
    <unit_qty>-1</unit_qty>
    <from_disposition>ATS</from_disposition>
    <to_disposition />
    <user_id>r7052891</user_id>
    <CREATE_DATE>
    <year>2012</year>
    <month>10</month>
    <day>31</day>
    <hour>10</hour>
    <minute>15</minute>
    <second>44</second>
    </CREATE_DATE>
    <ww_liability_code>342</ww_liability_code>
    <ww_ref_1 />
    <ww_ref_2 />
    <ww_tran_id>342021751180</ww_tran_id>
    <ww_alloc_no />
    <ww_final_store>342</ww_final_store>
    </InvAdjustDtl>
    </INVADJUSTDTL>
    </InvAdjustDesc>cond>11</second>
    </CREATE_DATE>
    <ww_liability_code>342</ww_liability_code>
    <ww_ref_1 />
    <ww_ref_2 />
    <ww_tran_id>342021751180</ww_tran_id>
    <ww_alloc_no />
    <ww_final_store>342</ww_final_store>
    </INVADJUSTDTL>
    </InvAdjustDesc>cond>11</second>
    </CREATE_DATE>
    <ww_liability_code>342</ww_liability_code>
    <ww_ref_1 />
    <ww_ref_2 />
    <ww_tran_id>342021751180</ww_tran_id>
    <ww_alloc_no />
    <ww_final_store>342</ww_final_store>
    </INVADJUSTDTL>
    </InvAdjustDesc>
    --------------------------------------Desired Output___________________
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <InvAdjustDesc>
         <dc_dest_id>852</dc_dest_id>
         <InvAdjustDtl>
              <item_id>12345</item_id>
              <adjustment_reason_code>989</adjustment_reason_code>
              <unit_qty>4</unit_qty>
              <from_disposition>ats</from_disposition>
              <to_disposition>tst</to_disposition>
              <user_id>w759862</user_id>
              <create_date>
                   <year>2012</year>
                   <month>10</month>
                   <day>31</day>
                   <hour>09</hour>
                   <minute>14</minute>
                   <second>23</second>
              </create_date>
              <ww_liability_code>852</ww_liability_code>
              <ww_ref_1/>
              <ww_ref_2/>
              <ww_tran_id>12358965</ww_tran_id>
              <ww_alloc_no/>
              <ww_final_store>323</ww_final_store>
         </InvAdjustDtl>
         <InvAdjustDtl>
              <item_id>78952675</item_id>
              <adjustment_reason_code>987</adjustment_reason_code>
              <unit_qty>5</unit_qty>
              <from_disposition>ats</from_disposition>
              <to_disposition>asr</to_disposition>
              <user_id>w7889526</user_id>
              <create_date>
                   <year>2012</year>
                   <month>10</month>
                   <day>31</day>
                   <hour>09</hour>
                   <minute>15</minute>
                   <second>02</second>
              </create_date>
              <ww_liability_code>456</ww_liability_code>
              <ww_ref_1/>
              <ww_ref_2/>
              <ww_tran_id>482665226</ww_tran_id>
              <ww_alloc_no/>
              <ww_final_store>456</ww_final_store>
         </InvAdjustDtl>
    </InvAdjustDesc>

  • How to set File Encoding to UTF-8 On Save action in JDeveloper 11G R2?

    Hello,
    I am facing issue when I am modifying a File using JDeveloper 11G R2. JDeveloper is changing the Encoding of the File to System default Encoding (ANSI) instead of UTF-8. I have updated the Encoding to UTF-8 in "Tools | Preferences | Environment | Encoding" option and restarted the JDeveloper. I have also updated "Project Properties | Compiler | Character Encoding" option to UTF-8. None of them are working.
    I am using below version of JDeveloper,
    Oracle JDeveloper 11g Release 2 11.1.2.3.0
    Studio Edition Version 11.1.2.3.0
    Product Version: 11.1.2.3.39.62.76.1
    I created a file in UTF-8 Encoding. I opened it, do some changes and Save it.
    When I open the "Properties" tab using "Help | About" Menu, I can see that the Properties of JDeveloper are showing encoding as Cp1252. Is it related?
    Properties
    sun.jnu.encoding
    Cp1252
    file.encoding
    Cp1252
    Any idea how to make sure JDeveloper saves the File in UTF-8 always?
    - Sujay

    I have already done that. That is the first thing I did as mentioned in my Thread. I have also added below 2 options in jdev.conf and restarted JDeveloper, but that also did not work.
    AddVMOption -Dfile.encoding=UTF-8
    AddVMOption -Dsun.jnu.encoding=UTF-8
    - Sujay

  • File encoding with UTF-8

    Hello all,
    My scenario is IDoc -> XI -> File (txt).
    Everything was working fine until i have to handle eastern european language with weird symbol
    So in my file adapter receiver, i'm using the file encoding code UTF-8 and when i look my field in output, everything is fine.
    BUT, when i look in binary, the length of these field is not longer fixed because a special character takes 2 bytes instead of one.
    I would like to know if it's possible to handle those characters with a file encoding code UTF-8 in a fixed length field of 40 characters for example don't want a variable length for my fields...
    Thanks by advance,
    JP

    I agree with you. In XI, i don't have this problem, i have it in my ouput file when i edit my text file in binary mode !
    My field should be on 40 characters but the special symbol which take 2 bytes instead of 1 make the length of my output fields variable !!!
    My question was to know if there is a way to have a fixed length in my output file..
    Sorry if i wasn't clear in my first post.
    JP

  • Changing the xml encoding from UTF-8 to ISO-8859-1

    Hi,
    I have created an xml file in xMII transaction that I feed into a webservice as input. As of now, the data in the xml file is entirely english text (it would be changing to have European text soon).  I gave the encoding as UTF-8.
    I get an error on the webservice side(not xMII code) that the its not able to parse. The error is 'SaxParseException: Invalid 1 of 1-byte UTF-8 sequence). I know that an easy fix is if tI change the encoding to iso-8859-1.
    But the reference document doesnot let me put anythign other than UTF-8. Even if I put <?xml version="1.0" encoding="iso-8859-1"?> as the first line, when I save it and open it back, i see <?xml version="1.0" encoding="UTF-8"?>
    Is there any way to change the encoding? Or better still, anyway idea why this invalid sequence is coming from?
    Thanks,
    Ravi.

    Hi Ravi,
    We have encountered scenarios where we needed to take the <?xml version="1.0" encoding="UTF-8"?> out completely.  As xMII was providing the Web Service, it needed a workaround.
    In your case, it seems that you wish to pass it from xMII to an external Web Service provider.  One option might be to pass the XML document as string.
    Once you convert it to a string, it may escape all XMl characters (i.e. '<' into '&lt;').  You could perform a string manipulation and remove the <?xml version="1.0" encoding="UTF-8"?> from the string.  You may also need to play around with xmlDecode( string ) function in the Link Editor.
    I would suggest that before you try this option, create a string variable will the contents, but without the <?xml version="1.0" encoding="UTF-8"?> and try assigning it to the input.
    You may also wish to try a string variable that has <?xml version="1.0" encoding="iso-8859-1"?> as the first line.  If this works, you should be able to perform string manipulations to convert your XML document into this modified string.
    Cheers,
    Jai.

  • Xml Parse throws SaxParseException.Encoding is UTF-8 insteadof ISO-8859-1 ?

    Hi All,
    I'm having some korean characters in my xml. when i tried to parse the xml i'm getting SaxParseException .
    <?xml version="1.0" encoding="UTF-8"?> --- Throwing Exception
    <?xml version="1.0" encoding="ISO-8859-1"?> --- No Exception, successfully parsed
    I'm not sure why UTF-8 is failing and ISO is passing. But I'm always getting xml with UTF-8 format? Can anyone know the reason?
    I also like to know the differences between UTF-8 and ISO, i don't find any good article/document for this.
    Thanks,
    J.Kathir

    When SAX throws an exception when the encoding is set to UTF-8, then the XML contains something that is not a valid UTF-8 code (i.e. your source file is not encoded using UTF-8). Also: whenever you ask about an exception you should definitely post the entire exception, including message and stack trace.
    If it doesn't throw an exception when it is set to ISO-8859-1, then it does not mean that this is the correct choice. ISO-8859-1 is defined from 0 up to 255, so any byte stream is correct in that encoding ('though not necessarily meaninful).
    You absolutely have to find out which encoding the file really is, before you can parse it. If it should contain Korean characters then it is definitely not ISO-8859-1 (or any other encoding from the ISO-8859 family), as those only support latin, cyrillic and similar scripts.

  • Change character encoding from UTF-8 to EUC-KR

    We are receiving data in UTF-8 in the querystring from a partner formatted as:
    %EA%B3%A0%EB%AF%BC%ED%95%98%EC%9E%90%21
    Our site uses EUC-KR so using this text for search/display/etc is not possible. Does anyone know how we can convert this to the proper Korean EUC encoding so it can be displayed properly using JSP? Basically it should be:
    %B0%ED%B9%CE%C7%CF%C0%DA%21
    Thanks in advance.

    I'm not sure where you are getting %xx encoded UTF-8.... Is it cuz you have it in a GET method form and that's what you are seeing in the browser's location bar? ...
    Let's assume you have a form on a page, and the page's charset is set to UTF-8, and you want to generate a URL encoded string (%xx format, although URLEncoder will not encode ASCII chars that way...).
    In the page processing the form, you need to do this:
    request.setCharacterEncoding("UTF-8"); // makes bytes read as UTF-8 strings(assumes that the form page was properly set to the UTF-8 charset)
    String fieldValue = request.getParameter("fieldName"); // get value
    // the value is now a Unicode String in Java, generated from reading the bytes submitted from the form as UTF-8 encoded text...
    String utf8EncString = URLEncoder.encode(fieldValue, "UTF-8");
    // now utf8EncString is a URL encoded (%xx) string of UTF-8 values
    String euckrEncString = URLEncoder.encode(fieldValue, "EUC-KR");
    // now euckrEncString is a URL encoded (%xx) string of EUC-KR valuesWhat is probably screwing things up for you mostly is this:
    euckrValue = new String(utf8Value.getBytes(), "EUC-KR");
    What this does is takes the bytes of the string utf8Value (which is not really UTF-8... see below) in the local encoding (possibly Cp1252 (Windows) or ISO8895-1 (Linux), or EUC-KR if it's Korean Windows), and then reads them as if they were EUC-KR... which they aren't.
    The key here is that Strings in Java are not of any encoding. They are pure Unicode values. Encodings only matter when converting to or from bytes. The strings stored in a file or sent over the net have to convert to bytes since that's what is stored/sent, just bytes. The encoding defines how the characters can be encoded into 1 or more bytes, and thus reconstructed.

  • Encoding from UTF-8 encoded String to Microsoft Project default encode

    Hi Expert ...
    I have a problem with encoding a String from UTF-8 String in order to write a MPX (Microsoft Project) file. I used UTF-8 on my Database encoding, and I want to write a MPX file using MPXJ library, but the result is (?) character. I think it's because I didn't encode yet to Shift JIS (a Microsoft Product default encoding). And after that I try to encode the String with Shift_JIS encoding, but the same result is appeared. I try to looking another way, but there is no result.
    I hope some expert would help me to solve this problem.
    Thank you,
    Alfian B.

    Totally wrong. A String doesn't have an encoding.
    Now if you had an array of bytes, which were encoded using one charset, and you wanted to convert that to an array of bytes encoded using a second charset, you would use code like this:byte[] bytes = // the bytes encoded in UTF-8, let's say
    String s = new String(bytes, "UTF-8"); // make that into a String
    byte[] newbytes = s.getBytes("windows-31j"); // encode the String into windows-31j

  • How to set the system default file character encoding to UTF-8?

    Hi all. This is driving me nuts, on both my Windows box and Snow Leopard; I figure much more chance of finding the answer for OS X.
    My language and locale are set to Australian English. $LANG=en_AU.UTF-8
    However, as I believe is expected, OS X (and Windows for that matter) will create files by default with character encoding of Cp1252 (Latin-1). That is, the FILE encoding in the file metadata - the Byte Order Mark I believe. The file itself, not the characters written to it.
    This, in a word, bites. I don't want to be restricted to only ASCII by default, and it is causing me problems with certain software (a Firefox plugin) that creates text files, passing in UTF-8 encoded content, which is then mangled because the file encoding itself is still Cp1252. (I know, I've tested this by changing the file encoding manually and having it overwritten again by the plugin: works correctly.)
    As a simple example, just `touch somefile` from terminal creates a file in Cp1252 -- I'm obtaining that info by opening in jEdit by the way (anyone know of something better?).
    In other locales that are not English-based, I believe the default file encoding is UTF-8. But surely this can be controlled independently? There must be a system configuration value somewhere that specifies file encoding default. Can someone please tell me what it is?
    Thanks!

    However, as I believe is expected, OS X (and Windows for that matter) will create files by default with character encoding of Cp1252 (Latin-1). That is, the FILE encoding in the file metadata - the Byte Order Mark I believe. The file itself, not the characters written to it.
    Apps like TextEdit and Mail have settings that let you determine the encoding of text produced. The default would normally depend on the character content of the file, ranging from ASCII for basic English to Windows Latin-1 (Win 1252) or ISO Latin -1 (ISO 8859-1) to UTF-8 for other content.
    Win 1252 is not ASCII, but has twice the number of characters in the latter.
    Byte Order Mark is something totally different --it's a particular character used to signal certain encodings.
    http://en.wikipedia.org/wiki/Byteordermark
    As a simple example, just `touch somefile` from terminal creates a file in Cp1252 -- I'm obtaining that info by opening in jEdit by the way (anyone know of something better?).
    For what Terminal does and how to change it, it might best to post in the Unix forum:
    http://discussions.apple.com/forum.jspa?forumID=735
    For problems with a FireFox plugin, it might be good to ask on their own forums as well.

  • c:import character encoding problem (utf-8)

    Aloha @ all,
    I am currently importing a file using the <c:import> functionallity (<c:import url="module/item.jsp" charEncoding="UTF-8">) but it seems that the returned data is not encoded with utf-8 and hence not displayed correctly. The overall file header is:
    HTTP/1.1 200 OK
    Server: Apache-Coyote/1.1
    Set-Cookie: JSESSIONID=E67F9DAF44C7F96C0725652BEA1713D8;
    Content-Type: text/html;charset=UTF-8
    Content-Length: 6861
    Date: Thu, 05 Jul 2007 04:18:39 GMT
    Connection: close
    I've set the file-encoding on all pages to :
    <%@ page contentType="text/html;charset=UTF-8" %>
    <%@ page pageEncoding="UTF-8"%>
    but the error remains... is this a known bug and is there a workaround?

    Partially, yes. It turns out that I created the documents in eclipse with a different character encoding. Hence the entire document was actually not UTF-encoded...
    So I changed each document encoding in Eclipse to UTF and got it working just fine...

  • Shape file encode in UTF-8

    hi all,
    I am interested to import shape file which is encode in UTF-8. When i import shape file with the help of map builder, i lost my Unicode character.
    NLS_NCHAR_CHARACTERSET value of my data base is AL16UTF16
    Any suggestion how i can import these Unicode code characters.

    If your CSV API offers the option of saving as UTF-8 (and it should), that would be the best way to go. Otherwise, you can use InputStreamReader and OutputStreamWriter to convert the file.

  • Encoding in UTF-8

    Can somebody help me in encoding in UTF-8 in java.
    In my project i need to take input in different language other than english and to put output in the same fashion.
    I will be thankfull if somebody help me out by giving some examples.

    Can somebody help me in encoding in UTF-8 in java.What do you want help with?
    Reading a file?
    Including localised strings (button labels and so fore)?
    In my project i need to take input in different
    language other than english and to put output in the
    same fashion.How are you getting the input? Swing componets? Files?
    I will be thankfull if somebody help me out by giving
    some examples.Examples of what?
    If you are taking about having localised versions of you application, I beleive this is what [url http://java.sun.com/j2se/1.5.0/docs/api/java/util/ResourceBundle.html]ResourceBundle is for.
    Most swing componets use [url http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html]strings, which are UTF16.
    .java files I think can be UTF8, but you need the -encoding passed to [url http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javac.html]Javac.
    [url http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/native2ascii.html]NativeToAscii might also be of some use.

  • Unable to set JVM file encoding to UTF-8 on Windows

    Hi,
    I am running Tomcat on 1.5.0_05 JRE. I tried several things to set the jvm file encoding to UTF-8 instead of the default Cp1252, but no luck yet.
    The most intuitive approach seems to be to use a JVM option like
    "-Dfile.encoding=UTF-8"
    but this does not seem to have any effect. I have a WinXP pro m/c. I saw some bug reports which seemed to indicate that changing the JVM file encoding is not an available feature....is that correct? I would really appreciate any help/pointers on this. I will post the solution if I find something in the meantime.
    Thanks,
    Sriram

    I am fail to set it too. I think it is better to separate the file.encoding into two, one for accept local OS, the other for compile .java and .jsp and so on files. So we can change it and the bugs will be decrease!

Maybe you are looking for

  • NFC payments (Timme Me app) on PlayBook 10.3.1 not working as well as Z30 10.3.1

    I've been using my Passport as my daily driver since launch, but one thing I missed about it was that NFC payments with the Timme Me app have been problematic / spotty: many times it fails completely and I have to resort to using the "barcode" like a

  • XSLT, namespaces and DOM

    Hello, I am trying to do the following: - build a DOM/XML-tree from information in tables using my own namespace - Transform this tree to HTML using a XSL-stylesheet in a file. A simple example I created works when I first save the XML-tree in a file

  • Slow rendering in Macbook Pro, FCP, HDV. Solutions?

    I have edited a few short films in dv-pal, but since I recently bought a HDV camera (Sony HDR-FX7) I want to edit next film in HDV 1080. I have a Mac Book Pro 2,33 with 2 GB RAM and Final Cut Studio. What can I do to make the editing process speedier

  • Status down

    i've just install OEL 5 and EBS 12.0 after completion of post install and apply the patch only HTTP componenet is Alive, how to make other comp alive? am i missing something. log 02/02/12-06:00:38 :: adapcctl.sh version 120.6 02/02/12-06:00:38 :: ada

  • My hp notebook 2000 takes forever to load and turn on, moves slow and sometimes cut off

    My pc takes forever to load, runs super slow and cuts off occasionally. I constantly have to recover it and that still don't seem to change a thing... is there anything else i can do to make my pc run the way it used too. I just bought it from Wal-Ma