473,783 Members | 2,287 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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">&#x3 9D;&#x3B1;
&#x3C0;&#x3C1;& #x3BF;&#x3BB;&# x3AC;&#x3B2;&#x 3B5;&#x3B9;
&#x3BC;&#x3AE;& #x3C0;&#x3C9;&# x3C2; &#x3C4;&#x3B 1;
&#x3BC;&#x3B7;& #x3C7;&#x3B1;&# x3BD;&#x3AE;&#x 3BC;&#x3B1;&#x3 C4;&#x3B1;
&#x3C3;&#x3B2;& #x3AE;&#x3C3;&# x3BF;&#x3C5;&#x 3BD;
&#x3BB;&#x3CC;& #x3B3;&#x3C9;
&#x3C5;&#x3C8;& #x3B7;&#x3BB;&# x3CE;&#x3BD;
&#x3C0;&#x3B9;& #x3AD;&#x3C3;&# x3B5;&#x3C9;&#x 3C2; &#x3C3;&#x3B 5;
&#x3C0;&#x3B5;& #x3C1;&#x3B9;&# x3C0;&#x3C4;&#x 3CE;&#x3C3;&#x3 B5;&#x3B9;&#x3C 2;
&#x3C0;&#x3BF;& #x3C5; &#x3B7;
&#x3B8;&#x3B5;& #x3C1;&#x3BC;&# x3BF;&#x3BA;&#x 3C1;&#x3B1;&#x3 C3;&#x3AF;&#x3B 1;
&#x3C0;&#x3B5;& #x3C1;&#x3B9;&# x3B2;&#x3AC;&#x 3BB;&#x3BB;&#x3 BF;&#x3BD;&#x3C 4;&#x3BF;&#x3C2 ;
&#x3B5;&#x3AF;& #x3BD;&#x3B1;&# x3B9;
&#x3C5;&#x3C8;& #x3B7;&#x3BB;&# x3AE; &#x3BA;&#x3B1;& #x3B9;
&#x3C4;&#x3B 1; &#x3BC;&#x3B7;& #x3C7;&#x3B1;&# x3BD;&#x3AE;&#x 3BC;&#x3B1;&#x3 C4;&#x3B1;
&#x380;˜{%!</option><option number="2">Î?α ανακαλÏ?Ï ?ει
μηÏ?ανήμΠ±Ï?α Ï?οÏ? Ï?Ï?Ï?Ï?ν Î*Ï?οÏ?ν κάÏ?οια
διαÏ?Ï?οή αÏ?Ï? Ï?ην Ï?ελεÏ?Ï?αΠ¯Î± Ï?οÏ?ά Ï?οÏ?
Î*γινε Î*λεγÏ?οÏ? και Ï?α οÏ?οία μÏ?οÏ?εί να
Ï?Ï?ÎµÎ¹Î¬Î¶ÎµÏ ?αι να εÏ?ιÏ?Î</option>
Jul 20 '05 #1
3 1720
"Phelim" <ph****@bluetre e.ie> schrieb im Newsbeitrag
news:58******** *************** ***@posting.goo gle.com...
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****@bluetre e.ie> schrieb im Newsbeitrag
news:3f******** *************@n ews.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
6866
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 normal but my application can not read in the data properly (Line breaks are not what is expected) Is there a way to translate a file to the windows default text encoding? Also, is there an API to determine the which encoding a system is using?
30
2766
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 in unexpected places and only when a non-ASCII or unicode character first found its way into the system. Below is an example. The program may runs fine at the beginning. But as soon as an unicode character u'b' is introduced, the program boom...
48
4645
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 once) * regular expression search & replace. Normally my documents are encoded with the ISO setting. Recently I was writing an XHTML document. After changing the encoding to UTF-8 I used the
2
5248
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 produced by a Lotus Notes system and often has illegal characters embedded to it. Of course the .NET XML parser produces an error. I’ve been reading about XmlConvert.EncodeName but not sure where to apply
12
1563
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., <?mypi &lt;par/&gt; ?> delivers as data part the String(!) "&lt;par/&gt;".
2
6714
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 name. 2. I use the cgi module module to get to the input from the user: .... name = form.value
7
3497
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! ------------------------------------------- Dim xmlWriter As New
2
1956
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 not process quoted-printable). In MailMessage class, I have no control over this encoding, anybody has idea I can I send email with 7bit encoding in .Net 2.0? -- Regards Hardy
4
4417
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 the Load with an error similar to "Invalid character in the given encoding. Line 3, position 5475070". After some research the character in question is the copyright character. My question is how can i force the reader to assume UTF-8? It seems...
0
10313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10081
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9946
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2875
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.