<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 4, 2015 at 12:51 AM, Kim Holviala <span dir="ltr"><<a href="mailto:kim@holviala.com" target="_blank">kim@holviala.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":1gt" class="a3s" style="overflow:hidden">It doesn’t detect the file encoding, it detects encoding per character on the fly. As in you can have both Latin-1 and UTF-8 on the same line in the same file and it will still do the right thing.<br>
<br>
Look at the function strniconv() on string.c line 144. Not the easiest to understand because it has lots of bit handling - you should probably read & fully understand some UTF-8 docs before trying to figure out what my code does and why it works the way it does.<div class="yj6qo ajU"><div id=":1kd" class="ajR" tabindex="0"></div></div></div></blockquote></div><br>Interesting :) Got a lnk to some docs/refs that explain how this works? (I assume you followed some well understood algo)</div><div class="gmail_extra"><br></div><div class="gmail_extra">cheers</div><div class="gmail_extra">James<br><br clear="all"><div><div class="gmail_signature"><span style="border-collapse:collapse;color:rgb(136,136,136);font-size:13px"><br><font face="arial, sans-serif">James Mills / prologic</font><br><br><font face="arial, sans-serif"></font><font face="'courier new', monospace">E: <a href="mailto:prologic@shortcircuit.net.au" style="color:rgb(0,0,204)" target="_blank">prologic@shortcircuit.net.au</a></font></span><div><span style="font-family:'courier new',monospace;color:rgb(136,136,136);font-size:13px">W: </span><a href="http://prologic.shortcircuit.net.au" style="font-family:'courier new',monospace;font-size:13px;color:rgb(0,0,204)" target="_blank">prologic.shortcircuit.net.au</a><br></div></div></div>
</div></div>