<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Apr 26, 2017 at 11:38 AM, Sebastian Berg <span dir="ltr"><<a href="mailto:sebastian@sipsolutions.net" target="_blank">sebastian@sipsolutions.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><span style="color:rgb(34,34,34)">I remember talking with a colleague about something like that. And</span><br></div></div>
basically an annoying thing there was that if you strip the zero bytes<br>
in a zero padded string, some encodings (UTF16) may need one of the<br>
zero bytes to work right.</blockquote><div><br></div><div>I think it's really clear that you don't want to mess with the bytes in any way without knowing the encoding -- for UTF-16, the code unit is two bytes, so a "null" is two zero bytes in a row.</div><div><br></div><div>So generic "null padded" or "null terminated" is dangerous -- it would have to be "Null-padded utf-8" or whatever.</div><div><br></div><div>  Though I</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
think it might have been something like "make everything in<br>
hdf5/something similar work" </blockquote><div><br></div><div>That would be nice :-), but I suspect HDF-5 is the same as everything else -- there are files in the wild where someone jammed the wrong thing into a text array ....</div><div> </div></div><div>-CHB</div><div><br></div><div><br></div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>Seattle, WA  98115       (206) 526-6317   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></div>