Re: TEXT TO DOCUMENT With Special Characters

2017-09-01 Thread Cannon Smith via 4D_Tech
I just tried receiving it as an object, but that didn’t work either. It’s okay, I have a workaround created now. Thanks. -- Cannon.Smith Synergy Farm Solutions Inc. Hill Spring, AB Canada 403-626-3236 > On Aug 31, 2017, at 5:07 PM, Keisuke Miyako via 4D_Tech

Re: TEXT TO DOCUMENT With Special Characters

2017-08-31 Thread Keisuke Miyako via 4D_Tech
have you tried receiving the response with a variable declared as object? if that doesn't work, then I guess you could receive BLOB, convert to text, and parse. it is always better to receive BLOB as opposes to text, picture or object, when you can't be sure of what goes on on the server side.

Re: TEXT TO DOCUMENT With Special Characters

2017-08-31 Thread Cannon Smith via 4D_Tech
Hi Miyako, This morning I figured out more exactly where the error was occurring. It isn’t as general as I thought and it isn’t from .json files coming from disk. Instead, it was only occurring when using HTTP Get to pull down a .json file from a website. I’m not sure if the web server should

Re: TEXT TO DOCUMENT With Special Characters

2017-08-31 Thread Keisuke Miyako via 4D_Tech
to text, obviously. plain text file formats such as CSS or JS have no way of asserting their encoding, so while it is true in general that a BOM for UTF8 is unnecessary, I believe they do serve an important role in the context of reading or writing a generic plain text file. 2017/09/01

Re: TEXT TO DOCUMENT With Special Characters

2017-08-31 Thread Keisuke Miyako via 4D_Tech
Hello, it's true that the commands were introduced to promote JSON, among other things, but as long as you use "document to json" to restore the text, the BOMs are removed anyway, so I can't see how the existence of a BOM could be such a big problem. 2017/08/31 23:25、Cannon Smith via 4D_Tech

Re: TEXT TO DOCUMENT With Special Characters

2017-08-31 Thread Cannon Smith via 4D_Tech
Thanks to everyone who responded. My first problem was using the UTF8 text without length constant instead of “UTF-8”. Who knew they would be different! Thanks for pointing that out, Justin. The main reason I didn’t want to have a BOM character was that JSON Parse chokes on such documents.

Re: TEXT TO DOCUMENT With Special Characters

2017-08-31 Thread Arnaud de Montard via 4D_Tech
> Le 31 août 2017 à 00:53, Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> a > écrit : > > I’m having trouble with saving Unicode characters to a file. For example, the > following code saves a file to disk: > > C_TEXT($tText;$tFilepath) > > $tText:=“©” //Copyright symbol >

Re: TEXT TO DOCUMENT With Special Characters

2017-08-30 Thread Justin Carr via 4D_Tech
On 31 Aug 2017, at 8:53 am, Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> wrote: > > I’m having trouble with saving Unicode characters to a file. For example, the > following code saves a file to disk: > > C_TEXT($tText;$tFilepath) > > $tText:=“©” //Copyright symbol > $tFilepath:=System

TEXT TO DOCUMENT With Special Characters

2017-08-30 Thread Cannon Smith via 4D_Tech
I’m having trouble with saving Unicode characters to a file. For example, the following code saves a file to disk: C_TEXT($tText;$tFilepath) $tText:=“©” //Copyright symbol $tFilepath:=System folder(Desktop)+"test.txt" TEXT TO DOCUMENT($tFilepath;$tText;UTF8 text without length) When I open the