{"id":42,"date":"2007-08-29T20:32:15","date_gmt":"2007-08-29T20:32:15","guid":{"rendered":"http:\/\/www.nukeitmike.com\/blog\/2007\/08\/29\/UnicodeIsntFriendlyToVbscript.aspx"},"modified":"2007-08-29T20:32:15","modified_gmt":"2007-08-29T20:32:15","slug":"unicode-isnt-friendly-to-vbscript","status":"publish","type":"post","link":"https:\/\/blog.nukeitmike.com\/index.php\/2007\/08\/29\/unicode-isnt-friendly-to-vbscript\/","title":{"rendered":"Unicode isn&#8217;t friendly to vbscript"},"content":{"rendered":"<p>I was trying to write a script to read a text file and evaluate the data to do some formatting on it.&nbsp; This is for a project I am working on and the person that gave me the text file wants some changes made based on the contents of the file.&nbsp; I have done similar things before, but I kept having trouble with this one.<\/p>\n<p>I started with trying to do a <em>readline <\/em>and then <em>echo<\/em> that back.&nbsp; Every time I tried it, I got <em>&nbsp;<font color=\"#ff0000\">\u00ff_[<\/font><\/em>&nbsp; (y with the umlaut, underscore and the bracket)as the output for the first line and then nothing for everything after that.&nbsp; I tried it against other text files and got the expected result.&nbsp; I was investigating, trying to figure out if there was a character in the file that didn&#8217;t work well, and finally decided to try and do a <em>writeline<\/em> to another text file to see if it would at least write the value out that way.&nbsp; <\/p>\n<p>Imagine my surprise when the results came back with a space between each letter in the source file.&nbsp; Turns out that it was in UNICODE format.&nbsp; I saved it as ANSI and then everything was golden.&nbsp; I also noticed that the file was half the original size&#8230;&nbsp; must have to do with all those extra spaces&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was trying to write a script to read a text file and evaluate the data to do some formatting on it.&nbsp; This is for a project I am working on and the person that gave me the text file wants some changes made based on the contents of the file.&nbsp; I have done similar&hellip; <a class=\"more-link\" href=\"https:\/\/blog.nukeitmike.com\/index.php\/2007\/08\/29\/unicode-isnt-friendly-to-vbscript\/\">Continue reading <span class=\"screen-reader-text\">Unicode isn&#8217;t friendly to vbscript<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[25],"tags":[],"class_list":["post-42","post","type-post","status-publish","format-standard","hentry","category-scripting","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pcW544-G","_links":{"self":[{"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/posts\/42","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/comments?post=42"}],"version-history":[{"count":0,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/posts\/42\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/media?parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/categories?post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/tags?post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}