From: Stephen D. <sd...@gm...> - 2005-06-10 16:55:29
|
On 6/10/05, Zoran Vasiljevic <zv...@ar...> wrote: >=20 > Am 10.06.2005 um 17:42 schrieb Stephen Deasey: >=20 > > That being the > > case, you should be able to check the type of the object given to > > ns_return, and act accordingly > > >=20 > And what if it shimmers away? >=20 > You read-in the file with "-translation binary" put the resulting data > in the nsv_array, and get it back from there later on? You've just passed arbitrary bytes to an API which expects UTF8.=20 Expect your server to crash... > Now, you'd get a string-type and you need to convert it to binary-array > back. Who will do that? > Normally, if I'd to write the content back, I need to open the file > for writing and set it again to "-translation binary" in order to get > the correct content back. >=20 > I'm not sure if it is enough to rely on the object type. It doesn't make sense to shimmer arbitrary bytes to UTF8 strings. The bytes will be mangled to make the string valid UTF8, but what use it that? |