XML unicode UTF-16
Hi
I am trying to reverse an Unicode 16 XML file.
The driver I am using is the following
JDBC DRIVER : com.sunopsis.jdbc.driver.xml.SnpsXmlDriver
JDBC URL : jdbc:snps:xml?f=C:/EMP.xml&s=EMP01
I am getting
"java.sql.SQLException: While generating the DTD from the XML file, a org.xml.sax.SAXParseException exception occurred saying: The encoding "UTF-16" is not supported."
error message. Whats the driver for UTF-16 XML files. If there a new jar file for it.
-app
I am answering my own question. Issue was with XML file. So UTF-16 and UTF-8 have same JDBC driver.
-app
Similar Messages
-
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,
Siva1This 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())); -
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
RoelHi 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 -
Unicode, UTF-8 and java servlet woes
Hi,
I'm writing a content management system for a website about russian music.
One problem I'm having is trying to get a java servlet to talk Unicode to the Content mangament client.
The client makes a request for a band, the server then sends the XML to the client.
The XML reading works fine and the client displays the unicode fine from an XML file read locally (so the XMLReader class works fine).
The servlet unmarshals the request perfectly (its just a filename).
I then find the correct class, and pass it through the XML writer. that returns the XML as string, that I simply put into the output stream.
out.write(XMLWrite(selectedBand));I have set correct header property
response.setContentType("text/xml; charset=UTF-8");And to read it I
//Make our URL
URL url = new URL(pageURL);
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.setRequestMethod("POST");
conn.setDoOutput(true); // want to send
conn.setRequestProperty( "Content-type", "application/x-www-form-urlencoded" );
conn.setRequestProperty( "Content-length", Integer.toString(request.length()));
conn.setRequestProperty("Content-Language", "en-US");
//Add our paramaters
OutputStream ost = conn.getOutputStream();
PrintWriter pw = new PrintWriter(ost);
pw.print("myRequest=" + URLEncoder.encode(request, "UTF-8")); // here we "send" our body!
pw.flush();
pw.close();
//Get the input stream
InputStream ois = conn.getInputStream();
InputStreamReader read = new InputStreamReader(ois);
//Read
int i;
String s="";
Log.Debug("XMLServerConnection", "Responce follows:");
while((i = read.read()) != -1 ){
System.out.print((char)i);
s += (char)i;
return s;now when I print
read.getEncoding()It claims:
ISO8859_1Somethings wrong there, so if I force it to accept UTF-8:
InputStreamReader read = new InputStreamReader(ois,"UTF-8");It now claims its
UTF8However all of the data has lost its unicode, any unicode character is replaced with a question mark character! This happens even when I don't force the input stream to be UTF-8
More so if I view the page in my browser, it does the same thing.
I've had a look around and I can't see a solution to this. Have I set something up wrong?
I've set, "-encoding utf8" as a compiler flag, but I don't think this would affect it.I don't know what your problem is but I do have a couple of comments -
1) In conn.setRequestProperty( "Content-length", Integer.toString(request.length())); the length of your content is not request.length(). It is the length of th URL encoded data.
2) Why do you need to send URL encoded data? Why not just send the bytes.
3) If you send bytes then you can write straight to the OutputStream and you won't need to convert to characters to write to PrintWriter.
4) Since you are reading from the connection you need to setDoInput() to true.
5) You need to get the character encoding from the response so that you can specify the encoding in InputStreamReader read = new InputStreamReader(ois, characterEncoding);
6) Reading a single char at a time from an InputStream is very inefficient. -
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. -
[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:
PaKoAnother 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 -
Hi all,
We are trying to interact with Documentum server through DFS exposed WCF which communicates through port 9443 and we are provided with documentum issued Public Key certificates. We have successfully imported the certificates in client machine and configured
the bindings as below in our .Net web application config file.
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding
name="ObjectServicePortBinding1">
<security
mode="Transport">
<transport
clientCredentialType="None"
proxyCredentialType="None"
realm=""
/>
<message
clientCredentialType="Certificate"
algorithmSuite="Default"
/>
</security>
</binding>
<binding
name="QueryServicePortBinding">
<security
mode="Transport">
<transport
clientCredentialType="None"
proxyCredentialType="None"
realm=""
/>
<message
clientCredentialType="Certificate"
algorithmSuite="Default"
/>
</security>
</binding>
</wsHttpBinding>
</bindings>
Also, we set the message encoding as MTOM and the wcf client object initialization code snippet is as below,
ObjectServicePortClient
serviceClient = new
ObjectServicePortClient(new
WSHttpBinding("ObjectServicePortBinding1"),
new
EndpointAddress(UriUtil.ObjectServiceUri));
if (serviceClient.Endpoint.Binding
is
WSHttpBinding)
WSHttpBinding
wsBinding = serviceClient.Endpoint.Binding as
WSHttpBinding;
wsBinding.MessageEncoding =
"MTOM".Equals(transferMode) ?
WSMessageEncoding.Mtom :
WSMessageEncoding.Text;
serviceClient.Endpoint.Behaviors.Add(new
ServiceContextBehavior(Config.RepositoryName,
Config.DocumentumUserName,
Config.DocumentumPassword));
When we execute the above code, we are getting error message as below,
Exception: The content type text/xml;charset=utf-8 of the response message does not match the content type of the binding (multipart/related; type="application/xop+xml"). If using a custom encoder, be sure that the IsContentTypeSupported
method is implemented properly. The first 407 bytes of the response were: '<?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope"><faultcode>S:VersionMismatch</faultcode><faultstring>Couldn't
create SOAP message. Expecting Envelope in namespace http://schemas.xmlsoap.org/soap/envelope/, but got http://www.w3.org/2003/05/soap-envelope </faultstring></S:Fault></S:Body></S:Envelope>'
Then, we changed the bindings as below
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding
name="ObjectServicePortBinding1">
<security
mode="Transport">
<transport
clientCredentialType="Certificate"
proxyCredentialType="None"
realm=""
/>
<message
clientCredentialType="Certificate"
algorithmSuite="Default"
/>
</security>
</binding>
<binding
name="QueryServicePortBinding">
<security
mode="Transport">
<transport
clientCredentialType="
Certificate"
proxyCredentialType="None"
realm=""
/>
<message
clientCredentialType="Certificate"
algorithmSuite="Default"
/>
</security>
</binding>
</wsHttpBinding>
</bindings>
We are getting another error message,
Exception: The client certificate is not provided. Specify a client certificate in ClientCredentials.
Any pointers on resolving this issue would be highly helpful.
ThanksHi Dhanasegaran,
As per your case, the corresponding details which may guide you to resolve this issue:
1. First of all, you can try to call the wcf service directly from the browser & check where it will point out the correct location.
2. In config file ,Set IncludeExceptionDetailInFaults to true to enable exception information to flow to clients for debugging purposes .
Set this to true only during development to troubleshoot a service like below :
<serviceBehaviors>
<behavior name="metadataAndDebugEnabled">
<serviceDebug
includeExceptionDetailInFaults="true"
/>
<serviceMetadata
httpGetEnabled="true"
httpGetUrl=""
/>
</behavior>
</serviceBehaviors>
3. I suggest you to change that <security mode ="TransportWithMessageCredential"> instead of <security mode ="Transport">
for more information, refer the following link :
https://msdn.microsoft.com/en-us/library/aa354508(v=vs.110).aspx -
I have a WCF service I am trying to run on a new installation of 64-bit Windows Server 2008 IIS. Although it runs fine on Windows 2003 IIS, it is throwing the error in the thread title, which appears to be a server config issue, but I am not sure. Googling and searching the MSDN forums did not turn up a solution. I tried running WCF Logging, but that didn't help either.
Does anyone have any suggestions on how to solve this probelm?
Here is the error:
The content type text/html of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>500 - Internal server error.</title>
<style type="text/css">I have the same issue on Windows 7 machine. The service works fine using a SoapUI client but a .Net client faisl to get a response.
Hi,
I have a WCF service which works perfectly when using SoapUI but throws error in my .Net client.
{"The content type text/html; charset=UTF-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first
1024 bytes of the response were: '<HTML><HEAD><link rel=\"alternate\" type=\"text/xml\" href=\"http://xyz.mysite.com/ysa/Broker.svc?disco\"/><STYLE type=\"text/css\">#content{ FONT-SIZE: 0.7em;
PADDING-BOTTOM: 2em; MARGIN-LEFT: 30px}BODY{MARGIN-TOP: 0px; MARGIN-LEFT: 0px; COLOR: #000000; FONT-FAMILY: Verdana; BACKGROUND-COLOR: white}P{MARGIN-TOP: 0px; MARGIN-BOTTOM: 12px; COLOR: #000000; FONT-FAMILY: Verdana}PRE{BORDER-RIGHT: #f0f0e0 1px solid; PADDING-RIGHT:
5px; BORDER-TOP: #f0f0e0 1px solid; MARGIN-TOP: -5px; PADDING-LEFT: 5px; FONT-SIZE: 1.2em; PADDING-BOTTOM: 5px; BORDER-LEFT: #f0f0e0 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #f0f0e0 1px solid; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e5e5cc}.heading1{MARGIN-TOP:
0px; PADDING-LEFT: 15px; FONT-WEIGHT: normal; FONT-SIZE: 26px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 3px; MARGIN-LEFT: -30px; WIDTH: 100%; COLOR: #ffffff; PADDING-TOP: 10px; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #003366}.intro{MARGIN-LEFT: -15px}</STYLE><TITLE>Broker
Service</TITLE></HEAD><BODY><DIV id=\"content\"><P class=\"head'."}
I have the same service hosted on my local machine and when I point to the local service I can execute the operation with no issues. The message encoding is Soap11. I tried changing to Soap12 but I get exact same error. Any ideas greatly appreciated.
I do have windows Activation Features installed and I am using .Net Framework 4.
Thanks
Sofia Khatoon -
Hi,
How can I change the content-type (text/xml;charset=utf-8) sent by the SOAP adapter to an external webservice?
I need to sent text/xml as content-type to the webservice, otherwise I get an error.
I have tried with different adapter modules but so far no positive results.
Thanks.
Edited by: Roberto Viana on Mar 26, 2009 2:02 PMHi Stefan, many thanks for your answer.
According to your answer it is not possible to manipulate/change the way PI fills the content-Type.
I was hoping to solve the issue with a custom built adapter module that sets the HTTP header content-type to text/xml without the charset entry, but I understand that's not the case.
Regards,
Roberto Viana -
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... -
HI all,
we try to post an XML message (cXML invoice) to a receiver but it doesn´t work.
We use a communication channel "http-destination" where we configure content-type "text/xml" together with XML encoding "UTF-8".
The configured URL works fine and can be tested in SM59.
The XML payload itself has a declaration <?xml version="1.0" encoding="UTF-8"?>
but the strange thing that happens is that all these declarations are being ignored and instead US-ASCII is used. Which leads to an error due to some special german characters within the contents of the XML (e.g. ä, ö, etc.).
Does anybody of you know how I can achieve that the pre-set UTF-8 will be used as encoding type???
Many thanky in advance!
Willi WuerstlinHi.
I am trying to map the standard cXML invoice to SAP's standard idoc INVOIC01 - This is how the file looks like
<?xml version="1.0" ?>
<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.014/InvoiceDetail.dtd">
<cXML version="" payloadID="2008-07-29T04:51:08-06:00.cXML.TEST4101V002" timestamp="2008-07-29T04:51:08-06:00" xml:lang="en-US">
<Header>...</Header>
...</cxml>
I am having problem with the line <!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.014/InvoiceDetail.dtd"> - when the payload is having this line XI is not accepting the message.
Please let me know how to address this.
Thanks. -
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 KBRight-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 -
On many web pages, where a quotation mark character should appear, instead the page displays the text ". 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. -
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.
-
Xml.getBytes("UTF-8")
Hi
I have seen xml.getBytes("UTF-8"). What is the use of this and Where can i get the other methods like getBytes(). e.g: xml.someMethod().
Please help.
Edited by: Monadear on Oct 18, 2007 11:37 AMIs xml declared as a String? Read the javadoc for the String class.
http://java.sun.com/javase/6/docs/api/java/lang/String.html
Maybe you are looking for
-
Using Time Capsule to back up external hard drive
I just purchased a Time Capsule with hopes to backup an external hard drive. I thought I could have it plugged into the Time Capsule USB port and run TIme Machine from my computer. Then, I was told that I couldn't do that but would have to plug Hard
-
have an Adobe PRO 11 user converting a word Document to PDF using PDFMAKER and all of the numbering is disappearing from left column,. Has anyone had this happen and if so what is the fix?
-
Suggestions for Authoring 16:9 & 4:3 Content ?
Hello - I am putting together a compilations DVD -- I have 16:9 and 4:3 content. I am struggling with how to present the content so that a 16:9 television and a 4:3 television both display their respective native formats correctly. I have been toying
-
On a desktop PC running Windows XE, FF will not launch. Has been working very well since we installed FF two weeks ago and made it our default browser. IE launches normally allowing me to post this question. On my laptop, on the same wireless connect
-
Hi, Has anyone seen where SNMP stops responding on a UCS-E after sometime? Disabling and re-enabling SNMP did not resolve issue, but restart of CIMC did. Versions: UCSES.1.5.0.2 (Build Date: 05/15/2013) CIMC Firmware: 2.1(1.20130726203500) The 2.2