473,385 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

xml encoding breaks

Hi.
Im trying to form xml where the content is all unicode, but the xml
seems to break at regular intervals, and will not see the content from
that point on as
unicode. It seems to add some extra characters onto the end of a node
(which are usually garbage and a few characters long). After this
point (which is always at the end of a particular node, the rest comes
out as it would if it
were not unicode.

It may have something to do with the length of the xml I am forming,
which is quite long.

In the following example, the following few characters are added to
the end of the option node..
"˜{%!"

<option number="1">&#x39D;&#x3B1;
&#x3C0;&#x3C1;&#x3BF;&#x3BB;&#x3AC;&#x3B2;&#x3B5;& #x3B9;
&#x3BC;&#x3AE;&#x3C0;&#x3C9;&#x3C2; &#x3C4;&#x3B1;
&#x3BC;&#x3B7;&#x3C7;&#x3B1;&#x3BD;&#x3AE;&#x3BC;& #x3B1;&#x3C4;&#x3B1;
&#x3C3;&#x3B2;&#x3AE;&#x3C3;&#x3BF;&#x3C5;&#x3B D;
&#x3BB;&#x3CC;&#x3B3;&#x3C9;
&#x3C5;&#x3C8;&#x3B7;&#x3BB;&#x3CE;&#x3BD;
&#x3C0;&#x3B9;&#x3AD;&#x3C3;&#x3B5;&#x3C9;&#x3C 2; &#x3C3;&#x3B5;
&#x3C0;&#x3B5;&#x3C1;&#x3B9;&#x3C0;&#x3C4;&#x3CE;& #x3C3;&#x3B5;&#x3B9;&#x3C2;
&#x3C0;&#x3BF;&#x3C5; &#x3B7;
&#x3B8;&#x3B5;&#x3C1;&#x3BC;&#x3BF;&#x3BA;&#x3C1;& #x3B1;&#x3C3;&#x3AF;&#x3B1;
&#x3C0;&#x3B5;&#x3C1;&#x3B9;&#x3B2;&#x3AC;&#x3BB;& #x3BB;&#x3BF;&#x3BD;&#x3C4;&#x3BF;&#x3C2;
&#x3B5;&#x3AF;&#x3BD;&#x3B1;&#x3B9;
&#x3C5;&#x3C8;&#x3B7;&#x3BB;&#x3AE; &#x3BA;&#x3B1;&#x3B9;
&#x3C4;&#x3B1; &#x3BC;&#x3B7;&#x3C7;&#x3B1;&#x3BD;&#x3AE;&#x3BC;& #x3B1;&#x3C4;&#x3B1;
&#x380;˜{%!</option><option number="2">Î?α ανακαλÏ?Ï?ει
μηÏ?ανήμαÏ?α Ï?οÏ? Ï?Ï?Ï?Ï?ν Î*Ï?οÏ?ν κάÏ?οια
διαÏ?Ï?οή αÏ?Ï? Ï?ην Ï?ελεÏ?Ï?αία Ï?οÏ?ά Ï?οÏ?
Î*γινε Î*λεγÏ?οÏ? και Ï?α οÏ?οία μÏ?οÏ?εί να
Ï?Ï?ειάζεÏ?αι να εÏ?ιÏ?Î</option>
Jul 20 '05 #1
3 1702
"Phelim" <ph****@bluetree.ie> schrieb im Newsbeitrag
news:58**************************@posting.google.c om...
Hi.
Im trying to form xml where the content is all unicode, but the xml
seems to break at regular intervals, and will not see the content from
that point on as
unicode. It seems to add some extra characters onto the end of a node
(which are usually garbage and a few characters long). After this
point (which is always at the end of a particular node, the rest comes
out as it would if it
were not unicode.

It may have something to do with the length of the xml I am forming,
which is quite long.

...


How about also telling us *how* you're producing the XML? Otherwise I don't
see how anybody is going to be able to help you.


Jul 20 '05 #2


Im forming the xml in php code.. the content is taken from a mysql
database. It is in unicode format in the database.

It seems to add on the last few characters, i.e. they are not part of
the unicode taken from the database.

After these characters are added (which is not always, but always in the
same few places), the encoding breaks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #3
"phelim McConigly" <ph****@bluetree.ie> schrieb im Newsbeitrag
news:3f*********************@news.frii.net...


Im forming the xml in php code.. the content is taken from a mysql
database. It is in unicode format in the database.

It seems to add on the last few characters, i.e. they are not part of
the unicode taken from the database.

After these characters are added (which is not always, but always in the
same few places), the encoding breaks.


In which case either your database is broken, or PHP, or your code. It
doesn't really seem to be an XML question, though.
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jamie | last post by:
I have a file that was generated on a customers computer which is not using the Windows default text encoding but uses Japanese(Shift-JIS) encoding. If I open the file in notepad the data looks...
30
by: aurora | last post by:
I have long find the Python default encoding of strict ASCII frustrating. For one thing I prefer to get garbage character than an exception. But the biggest issue is Unicode exception often pop up...
48
by: Zenobia | last post by:
Recently I was editing a document in GoLive 6. I like GoLive because it has some nice features such as: * rewrite source code * check syntax * global search & replace (through several files at...
2
by: Mike | last post by:
Hi! I have the following problem: I am getting an XML file from a 3rd party. The encoding on the XML file is encoding="utf-8" I have no control over generation of this file. This file is...
12
by: Christian Roth | last post by:
Hello, I am merely asking this for my own understanding: Processing instruction's data part is not entity-aware, i.e. character and numercial entities are not resolved at parsing time. E.g., ...
2
by: joakim.hove | last post by:
Hello, I am having great problems writing norwegian characters æøå to file from a python application. My (simplified) scenario is as follows: 1. I have a web form where the user can enter his...
7
by: John Hopper | last post by:
Hello, Using code below to create an xml file, how do I specifiy utf-8 encoding in the root element, ie create "<?xml version="1.0" encoding="utf-8"?> Thanks! ...
2
by: =?Utf-8?B?SGFyZHkgV2FuZw==?= | last post by:
In .Net 1.1 the default content-transfer-encoding is 7bit, in .Net 2.0 it is changed to quoted-printable by default. This change breaks some of my application (don't ask why, the other party could...
4
by: AGP | last post by:
I am programming an XML reader in VB.NET 2005 and it works fairly well. Once in a while though I encounter an old XML file without the header <?xml version="1.0" encoding="UTF-8"?> It craps out on...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.