<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forex Software — SyntaxError: Unexpected token � in JSON at position 0]]></title>
	<link rel="self" href="https://forexsb.com/forum/feed/atom/topic/9351/" />
	<updated>2023-03-10T17:26:22Z</updated>
	<generator>PunBB</generator>
	<id>https://forexsb.com/forum/topic/9351/syntaxerror-unexpected-token-in-json-at-position-0/</id>
		<entry>
			<title type="html"><![CDATA[Re: SyntaxError: Unexpected token � in JSON at position 0]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/73928/#p73928" />
			<content type="html"><![CDATA[<p>This issue is fixed in <strong>Express Generator v2.22</strong></p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2023-03-10T17:26:22Z</updated>
			<id>https://forexsb.com/forum/post/73928/#p73928</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: SyntaxError: Unexpected token � in JSON at position 0]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/73366/#p73366" />
			<content type="html"><![CDATA[<p>Thank you very much. This solved the problem</p>]]></content>
			<author>
				<name><![CDATA[amacaulay]]></name>
				<uri>https://forexsb.com/forum/user/13169/</uri>
			</author>
			<updated>2023-01-31T16:06:57Z</updated>
			<id>https://forexsb.com/forum/post/73366/#p73366</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: SyntaxError: Unexpected token � in JSON at position 0]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/73333/#p73333" />
			<content type="html"><![CDATA[<p>The problem is that NodeJS doesn&#039;t read UTF-8 files properly as exported from MT.</p><p>I tried many tricks to overcome that, but still, I had no success.</p><p>The current solution is to edit your Data Export scripts to export ASCII files instead of UTF8.</p><p>Open your Data export script and find the <strong>SaveFile</strong> function around line 131.</p><p>Replace:<br /></p><div class="codebox"><pre><code>int file_handle = FileOpen(fileName, FILE_WRITE|FILE_TXT);</code></pre></div><p>With:<br /></p><div class="codebox"><pre><code>int file_handle = FileOpen(fileName, FILE_WRITE|FILE_ANSI);</code></pre></div><p>This will force MT to export ASCII files, and Express Generator will be able to read them properly.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2023-01-30T11:18:56Z</updated>
			<id>https://forexsb.com/forum/post/73333/#p73333</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[SyntaxError: Unexpected token � in JSON at position 0]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/73246/#p73246" />
			<content type="html"><![CDATA[<p>I used the download script to download data from MT5. However, the data I got gives the following error when I used EG to generate strategies from the data. I have attached the data for your review. What could I be doing wrong?</p><p>C:\express-generator&gt;node bin/gen --server fxtm --symbol EURUSD --period D1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ..:: Express Generator v2.11 ::..<br />undefined:1<br />��{<br />^</p><p>SyntaxError: Unexpected token � in JSON at position 0<br />&nbsp; &nbsp; at JSON.parse (&lt;anonymous&gt;)<br />&nbsp; &nbsp; at Object.&lt;anonymous&gt; (C:\express-generator\bin\gen.js:52:25)<br />&nbsp; &nbsp; at Module._compile (node:internal/modules/cjs/loader:1159:14)<br />&nbsp; &nbsp; at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)<br />&nbsp; &nbsp; at Module.load (node:internal/modules/cjs/loader:1037:32)<br />&nbsp; &nbsp; at Module._load (node:internal/modules/cjs/loader:878:12)<br />&nbsp; &nbsp; at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)<br />&nbsp; &nbsp; at node:internal/main/run_main_module:23:47</p><p>Node.js v18.12.1</p>]]></content>
			<author>
				<name><![CDATA[amacaulay]]></name>
				<uri>https://forexsb.com/forum/user/13169/</uri>
			</author>
			<updated>2023-01-21T18:48:32Z</updated>
			<id>https://forexsb.com/forum/post/73246/#p73246</id>
		</entry>
</feed>
