Writing a UTF8 text file to server.
scott at elementarysoftware.com
scott at elementarysoftware.com
Thu Oct 4 02:08:38 EDT 2018
Hello Tim,
Did you look at the textEncode function?
—
Scott Morrow
> On Oct 3, 2018, at 10:22 PM, Tim Selander via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> I am using Livecode Server on Livecode's hosting plan.
>
> Taking my first stab at a web response form. I am getting the data from $_POST fine, and when I simply do something like:
> put $_POST[firstname]
>
> the UTF8/Kanji word shows up fine in the webpage. But I am unable to save the data to a file on the server encoded in UTF8 (simply trying to collect the submitted data).
>
> put "data.txt" into vfile
> open file vfile for utf8 text update
> put $_POST[firstname] & comma & $_POST[lastname] & comma & $_POST[country] & the time & return into vdata
> write vdata to file vfile at end
> close file vfile
>
> Data is getting saved, but in gibberish, not in kanji/utf8.
>
> Anyone see what I'm doing wrong?
>
> TIA
>
> Tim Selander
> Tokyo, Japan
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list