Problem using character encoding....

Hi,
I have written an app which constructs an email and sends it to subscribers. The data is read from the database (oracle 9) and its running on UNIX.
The subject title (read from the email) however does not appear correctly in the email. I think the encoding character set is incorrect.
When my subject title (a string) is:
test � $
i get something like this
test =?ANSI_X3.4-1968?Q?
I checked and the data is stored correctly in the database.
So i changed my method which reads the subject title from the database to:
for (int i = 0; i < o.length; i++) {
strArray[i] = new String(((String) o).getBytes(), "ISO-8859-1");
which basically changes the character encoding to ISO-8859-1 for the text. But now in the subject title i get
test $��
(the � shouldnt be there)
Any ideas? Which character set should i use?

You should use the character set that the database uses. Looks like it could be UTF-8.

Similar Messages

  • Problem with character encoding?

    I have a webpage containing a textarea. Users can enter some text or update existing text in the textarea and hit the save button. On submit the value of the text area is sent to a bean and then written to an Oracle 10g database. The page is then refreshed and the newly updated data is shown in the textarea.
    The problem is that users sometimes enter the trademark symbol into the textarea. They do this by entering &#153; which is the correct way of doing this. This is saved to the database ok. When the page refreshes the textarea displays the trademark symbol instead of &#153; This is not a problem. However any subsequent editing and saving of the textarea fails. Looking at the data in the bean (from the textarea) the trademark is show as a (?) in the string. When saving this to the database this error occurs:
    java.sql.SQLException: Cannot map Unicode to Oracle character.
    If i change the trademark symbol to &#153; it saves to the database fine. When the page is refreshed it displays the trademark symbol instead of &#153; and will no longer save to the database.
    Phew! hope that is clear!

    So it's like if you had, I dunno, say a discussion forum site, and people could use HTML escapes to include special characters in their posts, but if someone quoted the original post in their reply, they would see in the textarea the actual character instead of the escape sequence that the original poster used? I can see how you would want to fix that right away, because it would make it look like your site was being run by a bunch of apathetic morons. But if you don't feel like exercising your brain that much, you can just add a bunch of bells and whistles that nobody asked for, like smilies and html formatting (in the subject line as well as the message body). If that doesn't work, introduce a system where people can assign stars to posters who give good answers. That will make your users forget all about your site's little technical glitches, guaranteed.

  • Quotation marks display as &quot in web pages, I'm using Unicode UTF-8 character encoding.

    On many web pages, where a quotation mark character should appear, instead the page displays the text &quot. I believe this happens with other punctuation characters as well such as apostrophes although the text displayed in these other cases is different, of course. I'm guessing this is a problem with character encoding. I'm currently set to Unicode (UTF-8) encoding. Have tried several others without success.

    Here's a link where the problem occurs. Note the second line of the main body of text.
    http://www.sierratradingpost.com/lp2/snowshoes.html
    BTW, I never use IE, but I checked this site in IE and it shows the same problem, so maybe it is the page encoding after all rather than what I thought.
    In any case, my thanks for your help and would appreciate any solution you can suggest.

  • Wrong character encoding from flash to mysql

    Hi, im experiencing problems with character encoding not
    functioning correctly when sending from flash to mysql. What i am
    doing is doing a contact form in flash which then sends the value
    to a php file which takes the values and inserts them into a table.
    As i'm using icelandic charecters i need the char encoding to be
    either latin1 or utf8 in mysql, or at least i think so. But it
    seems that flash or the php document isn't sending in the same
    format as i have selected in mysql because all special icelandic
    characters come scrambled in the mysql table. Firefox tells me
    tough that the html document containing the flash movie is using
    utf-8.

    I don't know anything about Icelandic characters, but Flash
    generally really likes UTF-8. So it should be sending that if that
    is what it is starting with.
    You aren't using any kind of useCodePage? That will mess it
    up.
    Are you sure that the input method is Icelandic?
    In the testing environment can you list variables (from the
    debug menu) and see if they look proper? If they do then Flash is
    readying them correctly and the problem must be coming in further
    down stream.

  • FF character encoding issue in Mageia 2 ?

    Hi everyone,
    I'm running Mozilla Firefox 17.0.8 in a KDE distro of Linux called Mageia 2. I'm having problems in character encoding with certain web pages, meaning that certain icons like the ones next to menu entries (Login, Search box etc.) and in section headlines don't appear properly. Instead they appear either in some arabic character or as little grey boxes with numbers and letters written in it.
    I've tried experimenting with different encoding systems: Western (ISO 8859-1), (ISO 8859-15), (Windows 1252), Unicode (UTF-8), Central European (ISO 8859-2) but none of them does the job. Currently the char encoding is set to UTF-8. The same web page in Chrome (UTF-8) gives no such problem.
    Can you help me, please?

    Thank you!
    I solved my problem, however I find fonts are too small for certain web pages when compared to Chrome (see attached pictures of nytimes.com).
    Chrome's font size are set to "Medium".

  • Autonomy Character Encoding

    I'm sorry if this is not the right place to ask, but it seems to be the less inappropriate place XD
    I'm working with the Search Engine that is shipped with WebLogic Portal(Autonomy Idol), and I'm having some problems with character encoding, in the server where the Autonomy installation is running I have no access to the Internet so I cannot run the spider to search any website... so I ran a spider into my computer and It worked fine... then I exported the INDEXED data into an idx file which I uploaded into the production server and then I indexed, the problem is that some characters aren't shown correctly in my portlet, executing an action command such as /action=query&text=something_here I can see that the generated xml has this wrong characters, so definitely this is not a problem with my porltet, executing the same action in my local autonomy installation everything goes well so the questions are...
    Why Autonomy is not indexing correctly the special characters into my production environment?? and
    Why it happens only with some of them? for example the word Ingeniería is indexed correctly in some entries and not in some others, and both entries comes from the same idx file
    Thanks in advance
    P.S

    Sorry, in the example I gave, the none-english letters looks like this:
    &# 1490;&# 1497;&# 1488;(I made the space between the # and the number delibertly to prevent it from being presented as a letter ...).

  • XML Character Encoding Using UTL_DBWS

    Hi,
    I have a database with WINDOWS-1252 character encoding. I'm using UTL_DBWS to call a web service method which echoes a given string. For this purpose, I do the following:
    DECLARE
        v_wsdl CONSTANT VARCHAR2(500) := 'http://myhost/myservice?wsdl';
        v_namespace CONSTANT VARCHAR2(500) := 'my.namespace';
        v_service_name CONSTANT UTL_DBWS.QNAME := UTL_DBWS.to_qname(v_namespace, 'MyService');
        v_service_port CONSTANT UTL_DBWS.QNAME := UTL_DBWS.to_qname(v_namespace, 'MySoapServicePort');
        v_ping CONSTANT UTL_DBWS.QNAME := UTL_DBWS.to_qname(v_namespace, 'ping');
        v_wsdl_uri CONSTANT URITYPE := URIFACTORY.getURI(v_wsdl);
        v_str_request CONSTANT VARCHAR2(4000) :=
    '<?xml version="1.0" encoding="UTF-8" ?>
    <ping>
        <pingRequest>
            <echoData>Dev Team üöäß</echoData>
        </pingRequest>
    </ping>';
        v_service UTL_DBWS.SERVICE;
        v_call UTL_DBWS.CALL;
        v_request XMLTYPE := XMLTYPE (v_str_request);
        v_response SYS.XMLTYPE;
    BEGIN
        DBMS_JAVA.set_output(20000);
        UTL_DBWS.set_logger_level('FINE');
        v_service := UTL_DBWS.create_service(v_wsdl_uri, v_service_name);
        v_call := UTL_DBWS.create_call(v_service, v_service_port, v_ping);
        UTL_DBWS.set_property(v_call, 'oracle.webservices.charsetEncoding', 'UTF-8');
        v_response := UTL_DBWS.invoke(v_call, v_request);
        DBMS_OUTPUT.put_line(v_response.getStringVal());
        UTL_DBWS.release_call(v_call);
        UTL_DBWS.release_all_services;
    END;
    /Here is the SERVER OUTPUT:
    ServiceFacotory: oracle.j2ee.ws.client.ServiceFactoryImpl@a9deba8d
    WSDL: http://myhost/myservice?wsdl
    Service: oracle.j2ee.ws.client.dii.ConfiguredService@c881d39e
    *** Created service: -2121202561 - oracle.jpub.runtime.dbws.DbwsProxy$ServiceProxy@afb58220 ***
    ServiceProxy.get(-2121202561) = oracle.jpub.runtime.dbws.DbwsProxy$ServiceProxy@afb58220
    Collection Call info: port={my.namespace}MySoapServicePort, operation={my.namespace}ping, returnType={my.namespace}PingResponse, params count=1
    setProperty(oracle.webservices.charsetEncoding, UTF-8)
    dbwsproxy.add.map: ns, my.namespace
    Attribute 0: my.namespace: xmlns:ns, my.namespace
    dbwsproxy.lookup.map: ns, my.namespace
    createElement(ns:ping,null,my.namespace)
    dbwsproxy.add.soap.element.namespace: ns, my.namespace
    Attribute 0: my.namespace: xmlns:ns, my.namespace
    dbwsproxy.element.node.child.3: 1, null
    createElement(echoData,null,null)
    dbwsproxy.text.node.child.0: 3, Dev Team üöäß
    request:
    <ns:ping xmlns:ns="my.namespace">
       <pingRequest>
          <echoData>Dev Team üöäß</echoData>
       </pingRequest>
    </ns:ping>
    Jul 8, 2008 6:58:49 PM oracle.j2ee.ws.client.StreamingSender _sendImpl
    FINE: StreamingSender.response:<?xml version = '1.0' encoding = 'UTF-8'?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><ns0:pingResponse xmlns:ns0="my.namespace"><pingResponse><responseTimeMillis>0</responseTimeMillis><resultCode>0</resultCode><echoData>Dev Team üöäß</echoData></pingResponse></ns0:pingResponse></env:Body></env:Envelope>
    response:
    <ns0:pingResponse xmlns:ns0="my.namespace">
       <pingResponse>
          <responseTimeMillis>0</responseTimeMillis>
          <resultCode>0</resultCode>
          <echoData>Dev Team üöäß</echoData>
       </pingResponse>
    </ns0:pingResponse>As you can see the character encoding is broken in the request and in the response, i.e. the SOAP encoder does not take into consideration the UTF-8 encoding.
    I tracked down the problem to the method oracle.jpub.runtime.dbws.DbwsProxy.dom2SOAP(org.w3c.dom.Node, java.util.Hashtable); and more specifically to the calls of oracle.j2ee.ws.saaj.soap.soap11.SOAPFactory11.
    My question is: is there a way to make the SOAP encoder use the correct character encoding?
    Thanks a lot in advance!
    Greetings,
    Dimitar

    I found a workaround of the problem:
        v_response := XMLType(v_response.getBlobVal(NLS_CHARSET_ID('CHAR_CS')), NLS_CHARSET_ID('AL32UTF8'));Ugly, but I'm tired of decompiling and debugging Java classes ;)
    Greetings,
    Dimitar

  • When I load certain websites the the writing is all squashed up. I correct this by changing the character encoding setting. I am using the latest Apple Mac machine. Thanks in advance

    When I load certain websites the the writing is all squashed up. I correct this by changing the character encoding setting. I am using the latest Apple Mac machine. Thanks in advance

    Thanks for that information!
    I'm sure I will be calling AppleCare, but the problem is, they charge for the phone calls don't they? Because I don't have money to be spending to be on the phone with a support service.
    In other things, it seemed like the only time my MacBook was working was when I had Snow Leopard without the 10.6.8 update download that was supposed to be done to prepare for OS X Lion.
    When I look at the information of my HD it says that I have 10.6.8 but that was the install that it claimed to have failed and caused me to restart resulting in all of the repeated problems.
    Also, because my computer is currently down, and I've lost all files how would that effect the use of my iPhone? Because if it doesn't get fixed by the time OS 5 is released, how would I be able to upgrade?!

  • Problems with Forms and character encoding

    I'm having problems trying to read unicode data inputted into a Form on my JSP page.
    I've used the meta tag <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> to set the charset of the page to UTF-8. I've inputted some chinese characters inot my form and when I try to read the subsequent request parameter in my servlet using request.getParameter() the string returned is this
    "&#26469;&#28304;" which is the escape sequence required by HTML to display these characters.
    From what I've read on the subject this doesn't seem like the expected value. I've tried other ways of getting the correct string value such as setting the character encoding request.setCharacterEncoding("UTF-8") and then converting the bytes using this encoding value but it doesn't seem to work.
    I could write a method to split up the string using the ; as a token and working out the correct unicode character but this doesn't seem like the right thing to do.
    Any help on how to pass the correct information from the Form in the JSP page to the servlet would be greatly appreciated

    I don't believe that is correct, but if it's returning HTML escapes instead of URL Encoded characters, then it's the browser doing it. This is my test page for playing with Chinese...
    <%@ page language="java" contentType="text/html; charset=UTF-8" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
         <title></title>
         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    </head>
    <body bgcolor="#ffffff" background="" text="#000000" link="#ff0000" vlink="#800000" alink="#ff00ff">
    <%
    request.setCharacterEncoding("UTF-8");
    String str = "\u7528\u6237\u540d";
    String name = request.getParameter("name");
    %>
    req enc: <%= request.getCharacterEncoding() %><br />
    rsp enc: <%= response.getCharacterEncoding() %><br />
    str: <%= str %><br />
    name: <%= name %><br />
    <form method="GET" action="_lang.jsp" encoding="UTF-8">
    Name: <input type="text" name="name" value="" >
    <input type="submit" name="submit" value="GET Submit" />
    </form>
    <form method="POST" action="_lang.jsp" encoding="UTF-8">
    Name: <input type="text" name="name" value="" >
    <input type="submit" name="submit" value="POST Submit" />
    </form>
    </body>
    </html>

  • Web pages display OK, but print with garbage characters. I think it's character encoding, but don't know WHICH I should use. Have tried all Western and UTF options. Firefox 3.6.12

    I used to only have troubles with headers & footers printing out as garbage characters. I tried changing Character Encoding, now entire pages have garbage characters, even though pages view ok when browsing.

    If the pages look OK when you are browsing then it is not a problem with the encoding.<br />
    It can be a problem with the font that is used and you can try to disable website fonts and posibly try a few different default fonts to see if that helps.
    Tools > Options > Content : Fonts & Colors: Advanced (Allow pages to choose their own fonts, instead of my selections above)

  • What character encoding standard does tuxedo use

    Hi,
    I am trying to resolve a problem with communication between Tuxedo 6.4 and Vitria.
    It seems that there is a problem with the translation of special characters. Does
    anyone know what encoding standard that Tuxedo uses?
    Thanks.

    Thanks Scott, actually I was asked the following question by Vitria Technical Support,
    can you help?
    "XDR (External Data Representation) is a protocol used by BEA Tuxedo's
    communication engine. XDR handles data format transformations when passing
    messages across dissimilar processor architectures.
    This is not the equivalent of Character Encoding. I specifically need the
    Character Encoding used. I am not sure where your admin needs to check for
    this - it might even be set at the OS level. I suspect that it will be
    something like ISO-8859-1 or some derivative."
    Thanks.
    Scott Orshan <[email protected]> wrote:
    Within a machine, TUXEDO just sends the bytes that you give it. When
    it
    goes between machines, it uses XDR to encode the data values for
    transmission. There is no character set translation going on, unless
    you
    are going to an EBCDIC machine. (If you are using data encryption
    [tpseal] in TUXEDO 7.1 or 8.0 your data may be encoded even if it stays
    on the same machine type.)
         Scott Orshan
         BEA Systems
    Richard Astill wrote:
    Hi,
    I am trying to resolve a problem with communication between Tuxedo6.4 and Vitria.
    It seems that there is a problem with the translation of special characters.Does
    anyone know what encoding standard that Tuxedo uses?
    Thanks.

  • Character encoding problem by Gmail set up as exchange account on IOS mail

    It was maybe asked before but I could not find any solution. If someone can help I would appreciate it...
    If I set up my gmail, which I use very heavily, as Gmail on the IOS mail installation it would be set up as IMAP and does not push the emails. If I choose it to install as exchange account via m.google.com everything is OK and I get my mails instantly. But the way over exchange disturbs because of the character encoding problem. IOS mail does not show me the turkish or some german characters  like "ü" and the mail is almost not readable... By version 1 also as IMAP there is no problem with the characters but I must start IOS mail everytime to see if I have new mail...
    Does anyone know a solution for it?
    Thanks...
    Mel

    But I cannot set the the gmail app as standart email program, or? I mean if I want to send a page on safari and click send via email, the mail.app would start and not the gmail.app.... I am using Iphone since a few weeks and as far as I know a customisation is not possible.

  • 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...

  • How to use the character encoding model to use ' �'  in java

    hi
    I have to use the special characters like '�' using java.but when '�' character is transferred to data base or is displayed in my form,it is shown as '?'.but i need to display the original characters in the form of what it is.
    what can i do as i expects the result .i needs it very urgently.so reply to me as soon as possible.
    advance thank you
    rgds
    Oasisdeserts

    Java stores all characters as 16 bit UNICODE (which has plenty of room far more exotic characters than Greek). Every time character data is brought into, or stored from the Java environment it passes through a specific character encoding. If you don't state the encoding explicitly it uses the default encoding of the machine it's running on (which is typically oriented to the language set in the locale.).
    With a database the database driver is supposed to do any necessary translation. The non-latin character could be stored wrongly, the database could be returning it wrongly or whatever's creating your form could be interpretting it wrongly, or lack the capacity to display the character.
    If it's, say, a JSP try setting the page encoding to UTF-8. Try dumping the characters read from the database in HEX and look them up at www.unicode.org.
    Take a look at the database setup information, some have an option of storing characters as UNICODE or ASCII.
    The "?" is substituted whenever a codec can't make sense of the codes it's translating, either the byte array is invalid or the UNICODE character can't be represented.

  • Which character encoding do Adobe ExportPDF use when converting to word document?

    Which character encoding do Adobe ExportPDF use when converting to word document?

    Hi Ram,
    Sorry for the long delay. I've been trying to track down this answer for you.
    We're using UTF-8 character encoding for our files.
    -David

Maybe you are looking for