Hi All!<br><br>I have a very simple (and probably stupid) question eluding me.<br>When exactly is the char-set information needed?<br><br>To make my question clear consider reading a file.<br>While reading a file, all I get is basically an array of bytes.<br>
<br>Now suppose a file has 10 bytes in it (all is data, no metadata,<br>forget the BOM and stuff for a little while). I read it into an array of 10<br>bytes, replace, say, 2nd bytes and write all the bytes back to a new<br>
file. <br><br>Do i need the character encoding mumbo jumbo anywhere in this?<br><br>Further, does anything, except a printing device need to know the<br>encoding of a piece of "text"? I mean, as long as we are not trying<br>
to get a symbolic representation of a "text" or get "i"th character<br>of it, all we need to do is to carry the intended encoding as<br>an auxiliary information to the data stored as byte array.<br><br>
Right?<br><br>--shashank<br>