# libxml-Ruby ctrlA

**URL:** <https://www.ruby-forum.com/t/libxml-ruby-ctrla/90389>\
**Category:** Ruby\
**Created:** [March 28, 2007, 11:06am UTC](https://www.ruby-forum.com/t/libxml-ruby-ctrla/90389 "2007-03-28T11:06:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefanl38](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a698b9/32.png) [@stefanl38](https://www.ruby-forum.com/u/stefanl38)\
**Post date:** [March 28, 2007, 11:06am UTC](https://www.ruby-forum.com/t/libxml-ruby-ctrla/90389/1 "2007-03-28T11:06:17Z")

</div>

Hello,

on my Server amd x86\_64 ruby 1.8.4 and libXML 0.3.8.4 are installed. I  
read in large xml-Files and process it (that means delete some  
nodes/elements) and write them out. The output file contains sometimes  
suddenly ctrl+A characters.

I tried it also with ruby 1.8.5 and libXML 0.3.8.2. and crossover it. It  
is always the same.

Sometimes the ctrlA is in the middle of the element-tag and the rest is  
deleted. It looks like this for example  
normal:  
text

with ctrlA  
\<attrib name="foo^A\>text

For me it looks like an overflow.

Is this a known Bug? I can’t find anything.  
Is a workaround for that available?

Thanks for help

---

<div class="post-metadata">

**Author:** ![stefanl38](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a698b9/32.png) [@stefanl38](https://www.ruby-forum.com/u/stefanl38)\
**Post date:** [March 28, 2007, 12:16pm UTC](https://www.ruby-forum.com/t/libxml-ruby-ctrla/90389/2 "2007-03-28T12:16:51Z")

</div>

Stefan Lauer wrote:

> Hello,
> 
> on my Server amd x86\_64 ruby 1.8.4 and libXML 0.3.8.4 are installed. I  
> read in large xml-Files and process it (that means delete some  
> nodes/elements) and write them out. The output file contains sometimes  
> suddenly ctrl+A characters.
> 
> I tried it also with ruby 1.8.5 and libXML 0.3.8.2. and crossover it. It  
> is always the same.
> 
> Sometimes the ctrlA is in the middle of the element-tag and the rest is  
> deleted. It looks like this for example  
> normal:  
> text
> 
> with ctrlA  
> \<attrib name="foo^A\>text
> 
> For me it looks like an overflow.
> 
> Is this a known Bug? I can’t find anything.  
> Is a workaround for that available?
> 
> Thanks for help

I found out the ctrlA comes in on the read in with  
XML::Document.file(file)

If read in with File.new and write it out the ctrlA isn’t in the xml  
file.
