Re: TCL with large objects on Win
От | Andreas Kretzer |
---|---|
Тема | Re: TCL with large objects on Win |
Дата | |
Msg-id | 3C0CB115.E1BBE896@kretzer-berlin.de обсуждение исходный текст |
Ответ на | TCL with large objects on Win (Andreas Kretzer <andi@kretzer-berlin.de>) |
Список | pgsql-interfaces |
<tt>Tom Lane schrieb:</tt><blockquote type="CITE"><tt>Andreas Kretzer <andi@kretzer-berlin.de> writes:</tt><br /><tt>>When using the pg_lo_import or pg_lo_export functions,</tt><br /><tt>> everything is ok under Linux (where Idevelop and test</tt><br /><tt>> the application). When I started to make a test under</tt><br /><tt>> MS I recognized,that all this stuff is broken! It won't</tt><br /><tt>> import nor export binary data (while a fist test withsome</tt><br /><tt>> pure text and RTF files worked ok). So this all is related</tt><br /><tt>> to the binary stuff(CR/LF and EOF chars I think).</tt><tt></tt><p><tt>Ugh. I'm not sure that that stuff was ever tested with Windows clients</tt><br/><tt>before, and even less sure that it was tested with any recent Tcl</tt><br /><tt>version. It's verylikely that you've exposed a bug.</tt><tt></tt><p><tt>It's possible that the problem is related to UTF8 translation that's</tt><br/><tt>been imposed by recent Tcl versions. libpgtcl's original coding</tt><br /><tt>predates Tcl's adoptionof UTF8, and I'm not sure that anyone has done</tt><br /><tt>a careful review to look for translation issues. Sokeep that in mind</tt><br /><tt>while you're looking ...</tt><tt></tt><p><tt>> if returns the amount of read bytes (letssay we are at the</tt><br /><tt>> beginning of a large file, so it really reads the 4k bytes).</tt><br /><tt>>When I test the length of the string, it will be a lot</tt><br /><tt>> shorter (varies, most time it is abouthalf the size I expected</tt><br /><tt>> it to be).</tt><tt></tt><p><tt>This definitely smells like a translationissue: is the length counted</tt><br /><tt>in bytes, or characters? Does your data contain sequences that might</tt><br/><tt>be misinterpreted as UTF8 multibyte characters?</tt><br /><tt></tt> </blockquote><tt>Hmm, don't know.What does 'string length $buf' really return in TCL?</tt><br /><tt>And YES!!! Of course there can be any character sequencesince the data</tt><br /><tt>is straight forward binary stuff (ZIP-archives, GIF-pictures, WORD-</tt><br /><tt>documents,etc.)</tt><tt></tt><p><tt>But anyway, thanks for your response! I will keep you informed if I can</tt><br/><tt>find a way to build these DLLs on my own - and then I probably will fix</tt><br /><tt>this stuff and e-mailit to you!</tt><tt></tt><p><tt>regards</tt><br /><tt>Andreas</tt><br /><tt></tt> <br /><tt></tt>
В списке pgsql-interfaces по дате отправления: