{"id":1403,"date":"2011-11-01T18:40:01","date_gmt":"2011-11-01T18:40:01","guid":{"rendered":"http:\/\/www.readytext.co.uk\/?p=1403"},"modified":"2013-11-28T09:02:50","modified_gmt":"2013-11-28T09:02:50","slug":"a-nice-utf-8-decoder","status":"publish","type":"post","link":"https:\/\/www.readytext.co.uk\/?p=1403","title":{"rendered":"A nice UTF-8 decoder"},"content":{"rendered":"<p>If you want to explore passing UTF-8 string data to\/from LuaTeX to your C code\/library you may want to convert the UTF-8 data back into Unicode code points (reversing the UTF-8 encoding process discussed in <a href=\"https:\/\/www.readytext.co.uk\/?p=1284\">this post<\/a>). To do that you&#8217;ll need a UTF-8 decoder: here is a nice implementation of a UTF-8 decoder in C. Examples, source code  and explanations are available from <a href=\"http:\/\/bjoern.hoehrmann.de\/utf-8\/decoder\/dfa\/\">The Flexible and Economical UTF-8 Decoder<\/a>. Just to note that\u00a0 irrespective of the decoder you use make sure you read up and are aware of\u00a0 <a href=\"http:\/\/unicode.org\/reports\/tr36\/#UTF-8_Exploit\">UTF-8 security exploits<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to explore passing UTF-8 string data to\/from LuaTeX to your C code\/library you may want to convert the UTF-8 data back into Unicode code points (reversing the UTF-8 encoding process discussed in this post). To do that you&#8217;ll need a UTF-8 decoder: here is a nice implementation of a UTF-8 decoder in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-1403","post","type-post","status-publish","format-standard","hentry","category-unicode"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/www.readytext.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.readytext.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.readytext.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.readytext.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.readytext.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1403"}],"version-history":[{"count":6,"href":"https:\/\/www.readytext.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1403\/revisions"}],"predecessor-version":[{"id":3270,"href":"https:\/\/www.readytext.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1403\/revisions\/3270"}],"wp:attachment":[{"href":"https:\/\/www.readytext.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.readytext.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.readytext.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}