[Confirmed] CintaNotes may hang while importing XML

ale
Moderator
Posts: 202
Joined: Fri Feb 06, 2009 6:01 pm

[Confirmed] CintaNotes may hang while importing XML

Postby ale » Wed Jun 17, 2009 11:27 am

Hello Alex,
I was trying to fix and import the XML code in this topic: viewtopic.php?f=3&t=181, at first it was not well formed but after solving that I still had problems, I found CN can't import XML like in the test case below. Please, before importing, add a space before </note>. It seems CN doesn't like leading whitespace, so without a space before </note> it will work ok, with a space it will be not responsive during import and after some time I had to terminate CN with Task Manager

Code: Select all

<?xml version="1.0"?>
<notebook>
<note title="" date="2009-06-17" time="12:00:00" source="" link="" tags="">
<![CDATA[hello]]>
</note>
</notebook>

I also had problems with the encoding, now I have two dozens of XML files on the desktop and and I have a bit lost myself :) so I'll ask directly. What Unicode encoding does CN want for importing and does it look for a BOM at the beginning of the file? It seemed to me it wants UTF-16 with a little endian BOM at the beginning but I would like to see a confirmation. Will other flavours like UTF-8 work?

I also found the minimal XML it will accept it's like in the example I wrote, it requires non empty values for date and time. I think the requirement for the encoding and an example of the minimal working XML note might be written somewhere on the forum or in the FAQ
toddclausen
Moderator
Posts: 111
Joined: Fri Jan 30, 2009 3:28 pm
Contact:

Re: CintaNotes may hang while importing XML

Postby toddclausen » Wed Jun 17, 2009 12:14 pm

I can't reproduce this can you give some more info on what you are clipping from (I tried Notepad and PSPad and they worked) and open progs, etc?

EDIT - Oops, not sure why it worked at first, now it doesn't - I confirm this bug...
-Todd
kranor
Moderator
Posts: 229
Joined: Wed Feb 11, 2009 3:10 pm
Contact:

Re: CintaNotes may hang while importing XML

Postby kranor » Wed Jun 17, 2009 1:11 pm

Yup confirmed a space in front of </note> will cause Cintanotes to hang.
No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced.
User avatar
CintaNotes Developer
Site Admin
Posts: 4750
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: CintaNotes may hang while importing XML

Postby CintaNotes Developer » Thu Jun 18, 2009 5:37 am

Thanks for bringing this up folks. Well, what can I say: XML support in CintaNotes is now just enough to read back the files generated by export.
The encoding used is a big-endian UCS-2 (basically UTF-16 without surrogate pairs).
I will address this issue in (or maybe shortly after) Beta M10 via using a lightweight open-source XML parser instead of current dead simple regular expression-based implementation.
Alex
Midas
Moderator
Posts: 370
Joined: Thu Jan 29, 2009 10:40 am
Contact:

Re: CintaNotes may hang while importing XML

Postby Midas » Thu Jun 18, 2009 11:05 am

CintaNotes Developer wrote:Thanks for bringing this up folks. Well, what can I say: XML support in CintaNotes is now just enough to read back the files generated by export.
The encoding used is a big-endian UCS-2 (basically UTF-16 without surrogate pairs).
I will address this issue in (or maybe shortly after) Beta M10 via using a lightweight open-source XML parser instead of current dead simple regular expression-based implementation.

Take your time, but could you elaborate a little about why you prefered UCS-2 over UTF-8, for instance? In layman's terms, if you please... ;)
:D Midas, your friendly nugget gobbler, with a message from our sponsors:

Ask questions the smart way -- see www.catb.org/~esr/faqs/
ale
Moderator
Posts: 202
Joined: Fri Feb 06, 2009 6:01 pm

Re: [Open] CintaNotes may hang while importing XML

Postby ale » Thu Jun 18, 2009 8:02 pm

Alex take care of this as and when you see fit, there's really no hurry. I think we have a safe way to import XML, we just need to create one note, export it and then replicate that structure X times with our data :)

Return to “Bug Reports”