LibURL & file-encoding question

tkuypers at pandora.be tkuypers at pandora.be
Fri Jul 25 03:19:00 EDT 2003


Dave, Jan,

I was right in my assumption that the Oracle-guys sent me the wrong data...
They changed the encoding of the XML (don't ask me how or what) and now it
works like a charm :-)

Thanks for your assistance

Ton Kuypers


> From: Dave Cragg <dcragg at lacscentre.co.uk>
> Reply-To: use-revolution at lists.runrev.com
> Date: Thu, 24 Jul 2003 17:05:08 +0100
> To: <use-revolution at lists.runrev.com>
> Subject: Re: LibURL & file-encoding question
> 
> At 12:44 pm +0200 23/7/03, tkuypers at pandora.be wrote:
>> Jan,
>> 
>> I figured your solution out about 3 minutes after I sent my mail, but too
>> bad... It's a no-go :-(
>> 
>> What happens:
>> 
>> Use Explorer to fetch the XML data from the database:
>>   -> Shows perfect in the browser.
>> Save the file as an XML-file and re-open it:
>>   -> Parsing error
>> Open the XML in Notepad and save with UTF8 encoding:
>>   -> Shows perfect in the browser.
> 
> It looks like the problem is in the way Explorer saves the file. I'm
> assuming the original data is utf8 but it looks like it is getting
> saved as ISO latin.
> 
>> Then:
>> 
>> Get the url in RR and put it into tXMLData
>> put uniEncode(tXMLData,"UTF8") into URL("file:" & tFilePath)
> 
> This will convert the data to utf16 which is probably not what you
> want. (Also, it may be better to save XML data as a "binfile"  -- put
> ... into url ("binfile:" & tFilepath)
> 
>> Result: < ? x m l  v e r s i o n = " 1 . 0 " etc.
>> The second byte is obviously not used in the XML, so encoding does what it
>> has to do, but messes things up.
>> 
>> The XML does not have the encoding-part in the header, when I add it before
>> saving there is no difference.
>> 
>> Do you know if the XML in the database (Oracle) needs to be "formatted" or
>> transmitted in a special way by any chance? The strange thing is that
>> Explorer works with it fine, but saving the file screws it up...
> 
> I'm not sure exactly what you want to do. But if you just want to
> save the data as a utf-8 encoded file, what happens when you download
> with Rev, save to a file (using "binfile"), and then open in Internet
> Explorer?
> 
> Cheers
> Dave
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> 




More information about the use-livecode mailing list