Re: question about BText and international signs

Jacob Kjome <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
At 12:02 PM 10/30/2003 +0100, you wrote:
>Hi again!
>
>If you have a text with international signs and call
>"setAllowMarkupInText(true)" international signs will not get replaced by
>the entities, for example:
>
>String text = "ü";
>BText bt = new BText(text);
>bt.setAllowMarkupInText(true);

That is to be expected because of that last line.

>The node contains the text "ü" but should contain "&uuml;". Don't setting
>"setAllowMarkupInText(true)" works and the node contains "&uuml;"
>If this is a normal behaviour there should be at least a note in the Javadoc
>telling you to use entities for international signs when call
>"setAllowMarkupInText(true)".

setAllowMarkupInText(true) is a hack method allowing you to embed 
non-parsed markup in a document.  Internally, this is done as a CDATA 
section in the DOM.  This was provided for those who, for instance, store 
markup in a database and don't want to go through the extra step of parsing 
the dom and importing it as a node.  It is not the recommended way to deal 
with the dom and one risks invalid markup in the resulting document (as 
you've found).  It is, nevertheless, useful for people at certain times 
which is why it exists.  I haven't checked, but if this isn't detailed in 
the Javadoc, it should be added to avoid confusion.

>BTW: wouldn't it be nice to have a bug tracking system like Bugzilla on the
>project.

Agreed.  Hopefully our admins can find some spare time to set this up.

Jake
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.