More Cf + MySQL 5 + Unicode/UTF-8 Problems

Here is the problem:
I am using a MySQL database that store data in Unicode/UTF-8
(the website/database are in Lao).
Settings:
CF 7.0.2
MySQL 5.0.26
MySQL Defaults: latin1_swedish_ci collation, latin1 encoding
Database Defaults: utf8_general_ci collation, utf8 encoding
These are same on my local computer and on the host
(HostNexus)
The only difference is that my CF uses
mysql-connector-java-3.1.10 driver while the host uses MySQL 3.x
driver (org.gjt.mm.mysql.Driver class).
On my local computer everything works just fine, even without
any extra CF DSN settings (i.e. connection string and/or JDBC URL
do not need the useUnicode=true&characterEncoding=UTF-8 strings
added to show Lao text properly).
On the host, even with the
useUnicode=true&characterEncoding=UTF-8 added (I have even
tried adding
&connectionCollation=utf8_unicode_ci&characterSetResults=utf8
to the line as well), I only get ??????? instead of Lao text from
the db.
The cfm pages have <cfprocessingdirective> and
<cfcontent> tags set to utf-8 and also have html <meta>
set to utf-8. ALl static Lao text in cfm pages shows just fine.
Is this the problem with the MySQL driver used by the host?
Has anyone encountered this before? Is there some other setting I
have to emply with the org.gjt.mm.mysql.Driver class on the host?
Please help!

Thanks for your reply/comments, Paul!
I also think it must be the db driver used on the host... I
just don't understand why the DSN connection string
(useUnicode=true&characterEncoding=UTF-8 [btw, doesn't really
matter utf8 or UTF-8 - works with both; I think the proper way
actually is UTF-8, since that is the encosing's name used in
Java...]) wouldn't work with it??? I have the hosting tech support
totally puzzled over this.
Don't know if you can help any more, but I have added answers
to your questions in the quoted text below.
quote:
Sabaidee wrote:
> Here is the problem:
> I am using a MySQL database that store data in
Unicode/UTF-8 (the
> website/database are in Lao).
well that's certainly different.
I mean, they are in Lao language, not that they are hosted in
Laos.
> Database Defaults: utf8_general_ci collation, utf8
encoding
how was the data entered? how was it uploaded to the host?
could the data have
been corrupted loading or uploading to the host?
The data was entered locally, then dumped into a .sql file using
utf8 charset and then the dump imported into the db on the host,
once again with utf8 charset. I know the data in the database is
correct: when I browse the db tables with phpMyAdmin, all Lao text
in the db is displayed in proper Lao...
> The only difference is that my CF uses
mysql-connector-java-3.1.10 driver
> while the host uses MySQL 3.x driver
(org.gjt.mm.mysql.Driver class).
and does that driver support mysql 5 and/or unicode?
I am sure it does support MySQL5, as I have other MySQL5
databases hosted there and they work fine. I am not sure if it
supports Unicode, though.... I am actually more and more sure it
does not... The strange this is, I am not able to find the java
class that driver is stored in to try and test using it on my local
server... I have asked the host to email me the .jar file they are
using, but have not heard back from them yet...
> On my local computer everything works just fine, even
without any extra CF DSN
> settings (i.e. connection string and/or JDBC URL do not
need the
> useUnicode=true&characterEncoding=UTF-8 strings
added to show Lao text
> properly).
and what happens if you do use those? what locale for the
local server?
If I use just that line, nothing changes (apart from the 2 mysql
variables which then default to uft8 instead of latin1) -
everything works just fine locally.
The only difference I have noticed between MySQL setup on my
local comp and on the host is that on my comp the
character_set_results var is not set (shows [empty string]), but on
the host it is set to latin1. When I set it to latin1 on my local
comp using &characterSetResults=ISO8859_1 in the JDBC URL
string, I get exactly same problem as on the host: all ???????
instead of Lao text from db. If it is not set, or set to utf8,
everything works just fine.
For some reason, we are unable to make it work on the host:
whatever you add to the JDBC URL string or enter in the Connection
String box in CF Admin is simply ignored...
Do you know if this is a particular problem of the driver
used on the host?
> The cfm pages have <cfprocessingdirective> and
<cfcontent> tags set to utf-8
> and also have html <meta> set to utf-8. ALl static
Lao text in cfm pages
> shows just fine.
db driver then.
I think so too...

Similar Messages

  • SVN Merge - Another Unicode/UTF-8 problem

    When merging conflicts in Unicode/UTF-8 files (Java, XML, JSPX) the resulting file looses UTF-8 characters.
    This is yet another serious Unicode/UTF-8 bug in JDev. What is going on with Unicode/UTF-8 support? Currently, developing any fully "Globalized" application with JDev is "mission impossible"...

    Hi Steve!
    Thank you for info. In noticed that Trinidad 1.2.2, released 3 months ago, is not included in TP 2 also. So I understand that something commited on 20th of September also did not make to TP 2.
    Anyhow, god to know that we can expect better unicode support in TP 3 or so.

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

  • I upload all of my photos from my iphone 5 onto my macbook air to get more space on my phone, and now whenver i try to upload it says there is no more storage or there was a problem transferring a picture. what can I do to get more space onto my iphoto?

    i upload all of my photos from my iphone 5 onto my macbook air to get more space on my phone, and now whenver i try to upload it says there is no more storage or there was a problem transferring a picture. what can I do to get more space onto my iphoto? I've tried putting the pictures on flashdrives, but iphoto would no tlet me transfer.

    I don't know how large the SSD (solid state hard drive) is, or how big your iPhone 5 is, but with some iPhones having 64GB and some Airs having as little as 64GB and some having as much as 512GB it's not hard to see how storing the contents of your iPhone 5 on your Macbook Air could run you out of space.
    Go to the Macbook Air and bring up a finder window and pull the Go menu down and go to the Computer. Right click on the Macintosh HD and select get info. See if there is any available space on the MacBook Air. If not you are out of SSD space (you're storing more on your Macbook Air than it has storage for). I'm not sure if iTunes can store its library on an external hard drive or quite how you would make that happen. But even if you managed that, when the hard drive was disconnected, you would lose access to your library. Using a smart media card might be possible (I don't know) but it would probably be irritatingly slow. If you have a small Air and a big iPhone you might just have to find a different computer to sync to. Just remember a 64GB iPhone is a big chunk of SSD for a Macbook Air. I did it with my previous and my current Air but even my previous one had 256GB and I really just fit.

  • How to save a file in unicode (UTF-8)

    Hello,
    I'm trying to save a xml file in unicode (UTF-8) in a 4.6C system. I tried the OPEN DATASET 'file' IN TEXT MODE FOR OUTPUT ENCODING UTF-8 but this is not available in 4.6C. Does anybody have an idea how to do this?
    Thanks in advance
    Kind regards
    Roel

    Hi Roel,
    There is a workaround for this issue.
    Use code below:
    encoding = 'utf-8'.
      data: codepage            type cpcodepage.
      call function 'SCP_CODEPAGE_BY_EXTERNAL_NAME'
        exporting
          external_name = encoding
        importing
          sap_codepage  = codepage
        exceptions
          not_found     = 1
          others        = 2.
      if sy-subrc <> 0.
      endif.
      call function 'SCP_TRANSLATE_CHARS'
        exporting
          inbuff           = sourcedata_xml
          inbufflg         = length
          incode           = codepage
          outcode          = codepage
          substc_space     = 'X'
          substc           = '00035'
        importing
          outbuff          = custom_data
        exceptions
          invalid_codepage = 1
          internal_error   = 2
          cannot_convert   = 3
          fields_bad_type  = 4
          others           = 5.
    Now write this custom_data onto application server by using open dataset and transfer.
    Also have a look at this weblog, there is a code sample in it.
    /people/thomas.jung3/blog/2004/08/31/bsp-150-a-developer146s-journal-part-x--igs-charting
    Hope it'll help.
    Cheers
    Ankur

  • Read/Write file in Unicode (UTF-16)

    Hi, I have some issue to write a file in Unicode (UTF-16)
    I have to read a file with LabView, change some parameters and write the new data into the same file. The file uses Unicode UTF-16.
    I downloaded some library here: https://decibel.ni.com/content/docs/DOC-10153
    I can read the file, convert the data to UNI/ASCII/UNI, and then write the file. But when I open the new file with an editor like Notepad++ there are some unexpected characters at the end of the line.
    Even reading the file and writing exactly the same data doesn'not work.
    I attached an example.
    Thanks for you kind support.
    Solved!
    Go to Solution.
    Attachments:
    TEST.zip ‏7 KB

    Right-click on your Read and Write Text File functions.  There is an option to "Convert End Of Line".  Turn that off on both functions.
    As a side not, you don't need the Close File functions.  The Read and Write Text File functions will close the file if the file reference output is not wired.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Character encoding of Unicode (UTF-8) is what seems to be the default for printing. The page looks funny and the print is spread out.

    the layout of the page is different that it appears on the screen. I printed the confirmation of my VISA payment on line and it is not concise. The information is correct, but the layout isn't.
    Should I use another encoding? One of the Western ones? Maybe unicode (UTF-16)?

    There is a known bug involving printing in beta 12 that has been fixed in the Firefox 4 release candidate which is due out soon.

  • Oracle to Mysql character set conversion problem!!! PLZ IGNORE

    Hi Experts,
    I have created a database link from Oracle 10g to Mysql 5.
    I have installed Oracle Gateway 11g for this purpose.
    When i retreive the data from sql plus the text is displayed as question marks.
    Oracle 10g Database character set is WE8MSWIN1252
    Mysql character set --->latin1
    Character set of ODBC connector for mysql is  latin7
    Character set in the parameter file of HS folder is WE8MSWIN1252When i retrieve data from sql developer the text is fine(as i think it directly takes the character set of target) but
    when i login from sqlplus i get question marks!
    I have another post in Heterogeneous Connectivity forum
    Re: Oracle to Mysql character set conversion problem!!! PLZ HELP
    Kindly update your comments there,
    @@@@@@@@@@@@@@2
    Appreciate your help,
    regards
    Edited by: user10243788 on Apr 21, 2010 3:25 AM

    It is OK to post a globalization-related question in this forum in addition to the forum pertaining to the main technology. Not all experts follow all possible forums on OTN. Of course, you should cross-link the posts to let people merge the answers.
    Regarding the problem itself, make sure that SQL*Plus has the right NLS_LANG setting in the environment. On Windows, in the Command Prompt:
    C:\> set NLS_LANG=.WE8PC850
    C:\> sqlplus ...On Unix:
    $ setenv NLS_LANG .WE8ISO8859P1   (or NLS_LANG=.WE8ISO8859P1; export NLS_LANG)
    $ sqlplus ...-- Sergiusz

  • JDBC-ODBC Bridge does not support Unicode UTF-16

    Hi
    I'm using Jdeveloper 10.0.3 IDE in order to develop an application for data transformation between MS Access 2003 (source) and Oracle 10g (destination). Clients use Windows XP.
    JDBC-ODBC Bridge still does not support Unicode UTF-16 which is the Charest used by MS Access 2000/2003.
    Note that when I changed locale in regional setting, destination Connection to Ora10g failed to open a connection, it works only with English locale, so I can't change my locale information.
    How can I read Unicode from source DB?
    Any help would be appreciated. I look forward to see your response.
    Thanks,

    i also heared that JDBC-ODBC Bridge still does not support Unicode UTF-16,
    but i guess this is not in my case.That's the key in fact. JDBC-ODBC Bridge does not support UTF-16, which is the charset used by MS Access 2000/2003.
    or do i need to use a third party driver for jdbc odbc bridge?Free library at http://jackcess.sourceforge.net/
    Commerical JDBC driver at http://www.hxtt.com/access.html
    Yonghong Zhao
    System Analyst
    www.hxtt.com

  • My iPhone randomly turns off by itself with battery remaining. I can turn on the iPhone by hard restart. But sometimes it turns on at fifth, sixth, or more try. did anyone have this problem? and how can I fix it?

    My iPhone randomly turns off by itself with battery remaining. I can turn it on the by hard restart. But sometimes it turns on at fifth, sixth, or more try. did anyone have this problem? and how can I fix it?

    When my phone was off it wouldn't connect to iTunes, i got it working now though. I just had to hold my lock button and my home button down long enough. Thanks anyways though!

  • I cant login to DPS App Builder. Get this error: ERROR This account does not have permission to access App Builder. Learn more about how to resolve this problem.

    I cant login to DPS App Builder. Get this error: ERROR This account does not have permission to access App Builder. Learn more about how to resolve this problem.

    Then you either need to:
    1) Sign up for Creative Cloud so you can build a Single Edition app. Be warned though: this approach will no longer be valid as of May 1st when we retire support for Single Edition in Creative Cloud, and Single Edition apps are only on iPad devices.
    2) Sign up for a full DPS license. You can request pricing information by filling in Adobe | Request for consultation.
    Neil

  • No more data to read from socket UTF instance problem

    I'm using oracle jdbc thin driver and SunOne Application Server 7 environment.
    I'm trying to call the stored procedure which has one IN parameter that is of type CLOB.
    My code looks like this:
    conn = DriverManager.getConnection (url, username, password);
    conn.setAutoCommit(false);
    clob = CLOB.createTemporary(conn, true, CLOB.DURATION_SESSION);
    Writer wr = clob.getCharacterOutputStream();
    wr.write(m_data);
    wr.flush();
    wr.close();
         PreparedStatement pstmt = conn.prepareCall(procedureCall);
    pstmt.setClob(1, clob);
         pstmt.execute();
    but when I run it, it throws this (at wr.write(m_data) statement):
    [29/Jan/2003:15:07:25] WARNING ( 9340): CORE3283: stderr: java.io.IOException: No more data to read from socket
    [29/Jan/2003:15:07:25] WARNING ( 9340): CORE3283: stderr: at oracle.jdbc.dbaccess.DBError.SQLToIOException(DBError.java:716)
    [29/Jan/2003:15:07:25] WARNING ( 9340): CORE3283: stderr: at oracle.jdbc.driver.OracleClobWriter.flushBuffer(OracleClobWriter.java:270)
    [29/Jan/2003:15:07:25] WARNING ( 9340): CORE3283: stderr: at oracle.jdbc.driver.OracleClobWriter.write(OracleClobWriter.java:172)
    [29/Jan/2003:15:07:25] WARNING ( 9340): CORE3283: stderr: at java.io.Writer.write(Writer.java:150)
    [29/Jan/2003:15:07:25] WARNING ( 9340): CORE3283: stderr: at java.io.Writer.write(Writer.java:126)
    I tried using this instead of Writer:
    clob.putString(1, m_data);
    but the same error occurs.
    I then tried to do both of these:
    InputStream reader = new StringBufferInputStream(m_data);
    PreparedStatement pstmt = conn.prepareCall(procedureCall);
    pstmt.setUnicodeStream(1, reader, reader.available());
    Reader reader = new StringReader(m_data);
         PreparedStatement pstmt = conn.prepareCall(procedureCall);
    pstmt.setCharacterStream(1, reader, m_data.length());
    but in both cases I got this (at pstmt.setCharacterStream() or pstmt.setUnicodeStream()):
    [29/Jan/2003:16:06:00] WARNING ( 9340): CORE3283: stderr: java.sql.SQLException: Data size bigger than max size for this type: 76716
    [29/Jan/2003:16:06:00] WARNING ( 9340): CORE3283: stderr: at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    [29/Jan/2003:16:06:00] WARNING ( 9340): CORE3283: stderr: at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    [29/Jan/2003:16:06:00] WARNING ( 9340): CORE3283: stderr: at oracle.jdbc.ttc7.TTCItem.setArrayData(TTCItem.java:95)
    [29/Jan/2003:16:06:00] WARNING ( 9340): CORE3283: stderr: at oracle.jdbc.dbaccess.DBDataSetImpl.setBytesBindItem(DBDataSetImpl.java:2414)
    [29/Jan/2003:16:06:00] WARNING ( 9340): CORE3283: stderr: at oracle.jdbc.driver.OraclePreparedStatement.setItem(OraclePreparedStatement.java:1134)
    [29/Jan/2003:16:06:00] WARNING ( 9340): CORE3283: stderr: at oracle.jdbc.driver.OraclePreparedStatement.setUnicodeStream(OraclePreparedStatement.java:2633)
    But, the greatest mistery of all is that code with temporary CLOB works fine when I create instance and use default settings. Problem occurs when I create instance with UTF coding scheme. But we are forced to use Unicode coding scheme, because of local special characters.
    We are using Oracle 9i on Solaris UNIX platform and jdbc drivers supplied with it.
    The CLOB I am trying to pass is a XML file and it is possible to be up to 400 KB in size.
    Please help. I'm at my wit's end!

    Hi,
    I have a similar problem . This is the code that I used. Can u please help me
    oracle.sql.CLOB newClob = oracle.sql.CLOB.createTemporary(((org.apache.commons.dbcp.PoolableConnection) con).getDelegate() , true, oracle.sql.CLOB.DURATION_SESSION);
              newClob.open(oracle.sql.CLOB.MODE_READWRITE);
              Writer wr = newClob.getCharacterOutputStream();
              wr.write(valuesXml);
              wr.flush();
              wr.close();
              //newClob.putString(1,valuesXml);
              pst.setClob(1,newClob);
    These are the versions that I use
    java version is 1.4.2_06
    and it is a Liunx OS - gij (GNU libgcj) version 3.2.3 20030502 (Red Hat Linux 3.2.3-49)
    the Oracle version is 9.2.0.4.0
    The exception I see is
    java.io.IOException: No more data to read from socket
         at oracle.jdbc.dbaccess.DBError.SQLToIOException(DBError.java:716)
         at oracle.jdbc.driver.OracleClobWriter.flushBuffer(OracleClobWriter.java:270)
         at oracle.jdbc.driver.OracleClobWriter.flush(OracleClobWriter.java:204)

  • [UPDATED WORKAROUND] SEVERE unicode/ UTF-8 ADFm bidnig/invokation problem

    I have BIG problem with very simple search page use-case (with one text input field, search button and af:table for results). It looks like the unicode input value is somehow ruined during PPR and model update cycle (the unicode value is internally collated to ascii while transferred to EJB method)!!!
    Here is the scenario (please note that all was created by pure drag-and-drop from Data Controls palette):
    I have one inputText field on page, value of which is bound to simple attribute binding (say #{bindings.key.inputValue}) which is bound to vKey variable.
    In PageDef I have methodIterator with
    <methodIterator Binds="XYZ.result" Refresh="always" ...(the XYZ is method in some EJB) and I have adequate methodAction XYZ defined with named param:
    <NamedData NDName="key" NDValue="${bindings.vKey}" NDType="java.lang.String"/>The table is bound to tree binding bound to the above methodIterator. The button is PPR trigger for table (only thing nod done by drag-and-drop).
    JSPX page is xml encoding="UTF-8" with:
    <jsp:directive.page contentType="text/html;charset=UTF-8"
                           pageEncoding="UTF-8"/>There are no locale settings in faces-config.xml (the default config).
    In inputText I entered some unicode input text like "ЧШЩЪ".
    When button is clicked, the methodAction XYZ is invoked.
    The debugger brake-point is set inside EJB method.
    Now, during the PPR after button click, the EJB method brake-point is hited twice (I assume because the Refresh="always" for methodIterator). In firs hit, the value of key parameter is OK (correct unicode value visible in Inspect...). BUT, the second time (during the same PPR) the method is invoked WITH totally ruined value of "????"! Of course, the search didn't find anything...
    Thus, not only that problem of unicode is related to localization of pages/resources but something strange is happening with value binding also.
    Can someone help?
    Message was edited by:
    PaKo
    Message was edited by:
    PaKo

    Another way around:
    Instead using processScope or pageFlowScope (which is not releasing memory automatically so it may make you a problems further on), I discovered an alternative workaround:
    instead binding to #{bindings.someAttribBinding.inputValue} (which suffers from UTF-8 bug as concluded), you can bind your text inputs directly to #{bindings.someIterator.currentRow.dataProvider. someAttribute } which binds directly to your underlying data source property.
    In my case, I use EJBs so the underlying datasource is Entity bean and this way I bind directly to setter method thus overriding any ADFm interference.
    This shows to be more reliable and also MORE EFFICIENT! In case of indirect (via buggy attribute) binding, the getter method in entity is called twice while in case of direct binding (through .currentRow.dataProvider.someAttribute) the getter is called only once per page lifecycle (the setter is called once in both cases).
    I would, thus, suggest to ADF team to consider introduction of some sort of better support for direct binding to the underlying data sources instead through Iterators and Attribute bindings. On example, introduce Entity Binding (like Tree binding, but with direct support for access to entity attributes including parent/children collections). This also apply for list bindings where it is NECESSARY to enable object binding from list to entity attribute (as EJB entities don't know for foreign keys but for related entities so the attribute mapping supported with current list bindings is totally useless).
    Regards,
    Pavle

  • Problem setting Unicode (utf-8) in http header using tomcat

    Hi:
    I am trying to set a file name in utf-8 to http header using the following code:
    response.setContentType("text/html; charset=utf-8");
    response.setHeader("Content-disposition", "attachment; filename=&#35299;&#27770;.zip");
    // I actually has file name in utf-8 here to set to the header, and I know that the name is correctly
    // and I also looked into the response object MimeHeaders object and saw the head is correctly there
    then write the content of zip file using ServletOutputStream.
    The problem I have is that the file name is not displayed correctly when prompted to save or open in the pop up window next. I found out using Fiddler that the request header is wrong:
    Content-disposition: attachment; filename=&#65533;zn&#65533;�.zip
    I am using Tomcat 5.0.28. Any idea how to get this working?
    Thanks in advance!

    You are setting the charset for the content to be UTF-8. (That is why the method is called setContentType.) But HTTP headers are not part of the content and so that has no effect on the header.
    The original specification for HTTP only allowed US-ASCII characters in headers. It is possible that more recent versions have features that allow for non-ASCII header data, but I don't know if that is the case or how you would use those features if they exist.

  • Problem while sending unicode (utf-8) xml to IE.

    Hi,
    I have encoding problem while sending utf-8 xml from servlet to IE (Client), where i am parsing the xml using Ajax.
    In the log I can see proper special characters that are being sent from the servlet. but when same is seen in the client end,, it is showing ? symbols instead of special charcters.
    This is the code that sends the xml from servlet.
    ByteArrayOutputStream stream = new ByteArrayOutputStream(2000);
    transformer.transform(new DOMSource(document), new StreamResult(new OutputStreamWriter(stream, "iso-8859-1")));
    _response.setContentType("text/xml; charset=UTF-8");
    _response.setHeader("Cache-Control", "no-cache");
    _response.getWriter().println(new String(stream.toByteArray(),  "UTF-8"));
    In the log i can see :
    <response status="success" value="1154081722531" hasNextPage="false" hasPreviousPage="false" ><row row_id="PARTY_test_asdasd" column_0="PARTY_test_asdasd" column_1="asdasd �" mode="edit" column_en_US="asdasd �" column_de_DE="? xyz" column_fr_FR="" ></row></response>
    But in the Client side I am able to see
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <response status="success" value="1154082795061" hasNextPage="false" hasPreviousPage="false"><row row_id="PARTY_test_asdasd" column_0="PARTY_test_asdasd" column_1="asdasd ?" mode="edit" column_en_US="asdasd ?" column_de_DE="? xyz" column_fr_FR=""/></response>
    I am getting ? instead of �.
    It will be greatful if somebody tell how to send utf xml from servlet, for ajax purpose.
    Thanks,
    Siva1

    This is the code that sends the xml from servlet.
    ByteArrayOutputStream stream = new
    ByteArrayOutputStream(2000);
    transformer.transform(new DOMSource(document), new
    StreamResult(new OutputStreamWriter(stream,
    "iso-8859-1")));Here you produce XML that's encoded in ISO-8859-1. (!!!)
    _response.setContentType("text/xml; charset=UTF-8");Here you tell the browser that it's encoded in UTF-8.
    _response.getWriter().println(new String(stream.toByteArray(), "UTF-8"));Here you convert the XML to a String, assuming that it was encoded in UTF-8, which it wasn't.
    Besides shooting yourself in the foot by choosing ISO-8859-1 for no good reason, you're also doing a lot of translating from bytes to chars and back again. Not only is that a waste of time, it introduces errors if you don't do it right. Try this instead:_response.setContentType("text/xml; charset=UTF-8");
    _response.setHeader("Cache-Control", "no-cache");
    _transformer.transform(new DOMSource(document_),
                    new StreamResult(_response.getOutputStream()));

Maybe you are looking for

  • Unable to view data in the dataform

    I'm trying to update some forecast info & ran into an issue. I needed to update Contract Labor in the Lab Hierarchy, but the line was missing on the input form. I tried adding it back, and was able to get the line to show up , but it's showing all ze

  • How to apply Filter condition for a specific column but not to the report?

    Hi, I am having a issue in applying a filter condition to one of the column. I have a schema with one fact table and around 10 dimension tables. My requirement is to bring a count on the fact table with related to some other columns from the dimensio

  • White line on small images

    I inserted some small images to act as link-buttons. For some reason, some of them display a white line on the top. See the apple logo for instance here: http://kojema.net/cs/siteinfo.html and the green buttons here: http://kojema.net/cs/audio.html I

  • Two fact and one dimension table

    Hi folks i am new to this field ( 3 months ), my TL has given me one task i have to finish it up today itself, Can anyone one give me some idea how to implement req. The req is 1. there are 2 fact and one dimension table is there, i have to create re

  • C2-01: no reconnect incoming calls after 20sec

    Hi everybody, The incoming calls on my Nokia C2-01 are being reconnect after 20 sec. What do i have to do to change that? I don't want incoming calls to be reconnected and i think 20sec is real fast to reconnect a call, certainly when the phone is no