Re: revXML and UTF-8

2023-09-17 Thread jbv via use-livecode
r not being Unicode compatible (at least none I know of). In my opinion, bugs with no work-around should be among LC's higher priorities for bug fixes. On 9/17/2023 8:32 AM, jbv via use-livecode wrote: Hi list, I have a text file encoded in UTF-8. Each line of the file is an xml node wi

Re: revXML and UTF-8

2023-09-17 Thread Paul Dupuis via use-livecode
rk-arounds for not being Unicode compatible (at least none I know of). In my opinion, bugs with no work-around should be among LC's higher priorities for bug fixes. On 9/17/2023 8:32 AM, jbv via use-livecode wrote: Hi list, I have a text file encoded in UTF-8. Each line of the file is a

revXML and UTF-8

2023-09-17 Thread jbv via use-livecode
Hi list, I have a text file encoded in UTF-8. Each line of the file is an xml node with several sub-nodes and attributes. I have a loop in LC that reads lines one by one and creates an xml tree with revXMLCreateTree. The goal is to parse each line and extract some data. The problem

Re: LC 9.6.8 and UTF-8 on MacOS 10.15

2022-07-09 Thread Pi Digital via use-livecode
What result do you get from: put it contains “æ” Sean Cole Pi > On 9 Jul 2022, at 12:43, jbv via use-livecode > wrote: > > æ ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your

LC 9.6.8 and UTF-8 on MacOS 10.15

2022-07-09 Thread jbv via use-livecode
Hi list, I have a serie of text files in UTF-8 format for which I need to do some processing in LC, and then save to a single text file also in UTF-8. I am using the following code : open file tpath for UTF8 read read from file tpath until EOF close file tpath1 --put

Re: Help converting Hex UTF-8 bytes to character

2018-06-01 Thread Trevor DeVore via use-livecode
On Fri, Jun 1, 2018 at 2:06 AM, Mark Waddingham via use-livecode < use-livecode@lists.runrev.com> wrote: > On 2018-06-01 06:21, Monte Goulding via use-livecode wrote: > >> On 1 Jun 2018, at 2:18 pm, Trevor DeVore via use-livecode < >>> use-livecode@lists.runrev.com> wrote: >>> >>> Yes it does!

Re: Help converting Hex UTF-8 bytes to character

2018-06-01 Thread Mark Waddingham via use-livecode
On 2018-06-01 06:21, Monte Goulding via use-livecode wrote: On 1 Jun 2018, at 2:18 pm, Trevor DeVore via use-livecode wrote: Yes it does! `format` is my new best friend. Hmm… why not just throw the whole thing at format? If it has one escape sequence it might have others and you can’t put

Re: Help converting Hex UTF-8 bytes to character

2018-05-31 Thread Monte Goulding via use-livecode
> On 1 Jun 2018, at 2:18 pm, Trevor DeVore via use-livecode > wrote: > > Yes it does! `format` is my new best friend. Hmm… why not just throw the whole thing at format? If it has one escape sequence it might have others and you can’t put one in there and expect a single `\` to be literal.

Re: Help converting Hex UTF-8 bytes to character

2018-05-31 Thread Trevor DeVore via use-livecode
On Thu, May 31, 2018 at 5:20 PM, Monte Goulding via use-livecode < use-livecode@lists.runrev.com> wrote: > > I’m pretty sure that the following will do what you want here: > > textDecode(format(),”utf-8”) > Yes it does! `format` is my new best friend. Thanks for everyone’s

Re: Help converting Hex UTF-8 bytes to character

2018-05-31 Thread Monte Goulding via use-livecode
Hi Trevor I’m pretty sure that the following will do what you want here: textDecode(format(),”utf-8”) Cheers Monte > On 1 Jun 2018, at 6:13 am, Trevor DeVore via use-livecode > wrote: > > Hi, > > I have a text file that contains Hex UTF-8 bytes encode in the

Re: Help converting Hex UTF-8 bytes to character

2018-05-31 Thread Paul Dupuis via use-livecode
Actually, I think I meant tOS+2 to tOS+3, if the find starts on \x##, the the \ is tOS and tOS+1 is the x That's way I get for rushing a reply. On 5/31/2018 4:47 PM, Bob Sneidar via use-livecode wrote: > You meant tOS+1 to tOS+2? > >> On May 31, 2018, at 13:39 , Paul Dupuis via use-livecode >>

Re: Help converting Hex UTF-8 bytes to character

2018-05-31 Thread Bob Sneidar via use-livecode
You meant tOS+1 to tOS+2? > On May 31, 2018, at 13:39 , Paul Dupuis via use-livecode > wrote: > > tOS+2 to tOS+2 into tByte1 and char tOS+6 to tOS+7 into byte2 to get the ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this

Re: Help converting Hex UTF-8 bytes to character

2018-05-31 Thread Paul Dupuis via use-livecode
e that contains Hex UTF-8 bytes encode in the following > manner: > > ``` > \xC3\xB3 > ``` > > This particular sequence represents the following character: > > ``` > ó > ``` > > I need to read this file in, converting these hex bytes to the proper > character

Help converting Hex UTF-8 bytes to character

2018-05-31 Thread Trevor DeVore via use-livecode
Hi, I have a text file that contains Hex UTF-8 bytes encode in the following manner: ``` \xC3\xB3 ``` This particular sequence represents the following character: ``` ó ``` I need to read this file in, converting these hex bytes to the proper character. For example, the following string

AW: AW: AW: Why do I still need MacToISO, when working with UTF-8?

2017-01-17 Thread Tiemo Hollmann TB via use-livecode
;use-livecode@lists.runrev.com> Cc: Kay C Lan <lan.kc.macm...@gmail.com> Betreff: Re: AW: AW: Why do I still need MacToISO, when working with UTF-8? On Tue, Jan 17, 2017 at 1:24 AM, Mark Waddingham via use-livecode <use-livecode@lists.runrev.com> wrote: > > However, the 'endpoints'

Re: AW: AW: Why do I still need MacToISO, when working with UTF-8?

2017-01-17 Thread Kay C Lan via use-livecode
On Tue, Jan 17, 2017 at 1:24 AM, Mark Waddingham via use-livecode wrote: > > However, the 'endpoints' (i.e. where the developer can 'see' encoded text > output - e.g. when writing to a file, or encoding for a URL) had to remain > as before otherwise all existing

AW: Why do I still need MacToISO, when working with UTF-8?

2017-01-16 Thread Tiemo Hollmann TB via use-livecode
use-livecode Gesendet: Montag, 16. Januar 2017 18:30 An: How to use LiveCode <use-livecode@lists.runrev.com> Cc: Mark Waddingham <m...@livecode.com> Betreff: Re: Why do I still need MacToISO, when working with UTF-8? Hi Matthias, On 2017-01-16 18:25, Matthias Rebbe via use-li

Re: AW: AW: Why do I still need MacToISO, when working with UTF-8?

2017-01-16 Thread Sébastien Nouat via use-livecode
Hi Tiemo, As an additional note (if you don't absolutely need to write binary) it is also possible to use the syntax /open file for "utf8" text read/ or /open file for "utf8" text write/ in which cases the engine takes care of encoding/decoding the string

Re: Why do I still need MacToISO, when working with UTF-8?

2017-01-16 Thread Matthias Rebbe via use-livecode
ou read a file in binary mode, what you get is binary data *not* text - > i.e. it is just a sequence of bytes. The engine cannot tell by just looking > at the bytes what it could be therefore you have to explicitly convert it to > something - in this case we convert the sequence of bytes to

Re: Why do I still need MacToISO, when working with UTF-8?

2017-01-16 Thread Mark Waddingham via use-livecode
we convert the sequence of bytes to text by interpreting the bytes as UTF-8. One of the biggest changes from 6 to 7 is that binary strings and text strings are no longer the same thing. Prior to 7, the engine didn't really 'know' anything about Unicode - the field did to a certain

Re: Why do I still need MacToISO, when working with UTF-8?

2017-01-16 Thread Matthias Rebbe via use-livecode
the other side. I'm assuming > that PHP is doing the following: > 1) URLDecode the part after '?' into bytes > 2) Interpret the bytes as Latin-1 encoded text > 3) Passing the text string to the appropriate MySQL function > 4) The MySQL function is converting the text string t

Re: Why do I still need MacToISO, when working with UTF-8?

2017-01-16 Thread Mark Waddingham via use-livecode
I'm assuming that PHP is doing the following: 1) URLDecode the part after '?' into bytes 2) Interpret the bytes as Latin-1 encoded text 3) Passing the text string to the appropriate MySQL function 4) The MySQL function is converting the text string to UTF-8 This may or may not

Re: Why do I still need MacToISO, when working with UTF-8?

2017-01-16 Thread Matthias Rebbe via use-livecode
Hi Mark, although i am not the original poster i really appreciate you explanation. The only thing what was missing … It would have been nice if you had also put some sample code for how to UTF8 encode the string. That would have made your explanations complete. ;) I am pretty sure there are

Re: AW: AW: Why do I still need MacToISO, when working with UTF-8?

2017-01-16 Thread Mark Waddingham via use-livecode
Hi Tiemo, thank you for taking your time and clarifying. I wasn't aware that the internal format on a Mac client is MacRoman. I thought it would be a "neutral" UTF-8 format. Internally, the engine uses either MacRoman/ISO-Latin1 *or* UTF-16 depending on platform and what the strin

AW: AW: Why do I still need MacToISO, when working with UTF-8?

2017-01-16 Thread Tiemo Hollmann TB via use-livecode
Hi Mark, thank you for taking your time and clarifying. I wasn't aware that the internal format on a Mac client is MacRoman. I thought it would be a "neutral" UTF-8 format. Thanks Tiemo -Ursprüngliche Nachricht- Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com]

Re: AW: Why do I still need MacToISO, when working with UTF-8?

2017-01-16 Thread Mark Waddingham via use-livecode
Hi Tiemo, Okay so, I'm assuming that all this code is running on the Mac client... *put fld "name" into myName* At this point myName contains a (text) string - thus encoding issues don't exist (you should think of text strings in memory as being stored in an 'encoding neutral' format).

AW: Why do I still need MacToISO, when working with UTF-8?

2017-01-16 Thread Tiemo Hollmann TB via use-livecode
use LiveCode <use-livecode@lists.runrev.com> Cc: Mark Waddingham <m...@livecode.com> Betreff: Re: Why do I still need MacToISO, when working with UTF-8? Hi Tiemo, On 2017-01-16 11:57, Tiemo Hollmann TB via use-livecode wrote: > Now my German Umlaute don't get corrupted in the MySQL db and

Re: Why do I still need MacToISO, when working with UTF-8?

2017-01-16 Thread Mark Waddingham via use-livecode
Hi Tiemo, On 2017-01-16 11:57, Tiemo Hollmann TB via use-livecode wrote: Now my German Umlaute don't get corrupted in the MySQL db and everything is fine, but I would like to understand the technical background. Why do I still need MacToISO() in LC 8 on a Mac and even worse, I didn't needed

Why do I still need MacToISO, when working with UTF-8?

2017-01-16 Thread Tiemo Hollmann TB via use-livecode
Hello, Probably my knowledge about code sets is too limited. My thinking was, that UTF-8 includes the same characters above ASCII 128 independent of the platform and makes data transfer between different platform compatible without conversion of a char set. Migrating a LC 6 program to LC 8 I just

AW: I need help with UTF-8

2017-01-13 Thread Tiemo Hollmann TB via use-livecode
-livecode-boun...@lists.runrev.com] Im Auftrag von Tiemo Hollmann TB via use-livecode Gesendet: Freitag, 13. Januar 2017 09:58 An: 'How to use LiveCode' <use-livecode@lists.runrev.com> Cc: Tiemo Hollmann TB <toolb...@kestner.de> Betreff: AW: I need help with UTF-8 Hi Kay C, I have ch

AW: I need help with UTF-8

2017-01-13 Thread Tiemo Hollmann TB via use-livecode
ecode-boun...@lists.runrev.com] Im Auftrag von Kay C Lan via use-livecode Gesendet: Freitag, 13. Januar 2017 04:56 An: How to use LiveCode <use-livecode@lists.runrev.com> Cc: Kay C Lan <lan.kc.macm...@gmail.com> Betreff: Re: I need help with UTF-8 We may need to see your actual scripts to determine

Re: I need help with UTF-8

2017-01-12 Thread Kay C Lan via use-livecode
We may need to see your actual scripts to determine where the problem may be. Also, how do you know that your MySQL db data is corrupt? What program are you using to look at it? How was the db set up in the first place; what character set and collation? Is it possible that your Windows db Client

I need help with UTF-8

2017-01-12 Thread Tiemo Hollmann TB via use-livecode
Hello, I am migrating a LC 6 program to LC 8 and shortly before release, after I thought I have made all hurdles I am again lost with Mac - LC 8 - PHP - MySQL -UTF-8 and German Umlaute (the MySQL name field is "utf8_general_ci" coded): Scenario 1 (without local file): -

Re: understanding on how to handle UTF-8 import/export

2016-12-07 Thread Devin Asay
> On Dec 6, 2016, at 7:13 AM, Tiemo Hollmann TB <toolb...@kestner.de> wrote: > > Thanks Peter, that works fine. > Perhaps you could add a cross reference in the docs at uniEncode/uniDecode > to textEncode/textDecode, that would have helped me. > I know, that there was w

AW: understanding on how to handle UTF-8 import/export

2016-12-06 Thread Tiemo Hollmann TB
Thanks Peter, that works fine. Perhaps you could add a cross reference in the docs at uniEncode/uniDecode to textEncode/textDecode, that would have helped me. I know, that there was written a lot about UTF-8 when it was released in LC7, but if you don't need it at that time, it is hard to find

Re: understanding on how to handle UTF-8 import/export

2016-12-06 Thread Peter TB Brett
On 06/12/2016 13:42, Tiemo Hollmann TB wrote: In my LC 6 programs I have uniEncoded and uniDecoded text when exporting/importing text to an xml file via revXML. Now with LC 8 everything internal in LC is UTF-8 and since uniDecode/uniEncode is deprecated my first thought was, that I could

understanding on how to handle UTF-8 import/export

2016-12-06 Thread Tiemo Hollmann TB
Hello, In my LC 6 programs I have uniEncoded and uniDecoded text when exporting/importing text to an xml file via revXML. Now with LC 8 everything internal in LC is UTF-8 and since uniDecode/uniEncode is deprecated my first thought was, that I could straight export/import text from LC fields

Re: JSON, URL-encode, and UTF-8

2015-08-21 Thread J. Landman Gay
On 8/21/2015 3:06 AM, Dave Cragg wrote: Instead of removing the httpHeaders setting, what if you set it to this? set the httpHeaders to Content-Type: application/x-www-form-urlencoded This is normally the default for post, but if you had set it to something else earlier, I was wondering

Re: JSON, URL-encode, and UTF-8

2015-08-21 Thread Peter W A Wood
On 21 Aug 2015, at 10:59, Peter W A Wood peterwaw...@gmail.com wrote: Jacque On 21 Aug 2015, at 10:13, J. Landman Gay jac...@hyperactivesw.com mailto:jac...@hyperactivesw.com wrote: Here's a test. This posts just fine in LC 6.x but fails in 7.0.6 and 7.1rc1. Make a field with this

Re: JSON, URL-encode, and UTF-8

2015-08-21 Thread Dave Cragg
On 21 Aug 2015, at 02:27, J. Landman Gay jac...@hyperactivesw.com wrote: On 8/20/2015 6:45 PM, Dave Cragg wrote: What happens if you remove the httpHeader setting and also UrlEncode tData? Still errors I'm afraid. Instead of removing the httpHeaders setting, what if you set it to this?

Re: JSON, URL-encode, and UTF-8

2015-08-21 Thread Charles Warwick
HI Peter, I did some testing with Jacque and found that her LC7 was sending the wrong content-type when posting to the PHP script. In case anyone is interested: It was using a content type of 'application/json’ which would have made sense if the PHP script was written to accept the json data

Re: JSON, URL-encode, and UTF-8

2015-08-21 Thread Peter W A Wood
Hi Charles On 21 Aug 2015, at 16:07, Charles Warwick char...@techstrategies.com.au wrote: HI Peter, I did some testing with Jacque and found that her LC7 was sending the wrong content-type when posting to the PHP script. In case anyone is interested: It was using a content type

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread Charles Warwick
That script works here with HTTPS, I am guessing there is something else specific about the configuration. On 21 Aug 2015, at 1:23 pm, Peter W A Wood peterwaw...@gmail.com wrote: Jacque This works fine in LiveCode 7.0.3. I’ll download 7.1RC1 and see if it works there too. Apart

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread J. Landman Gay
Now I don't know what to try next. :( But I appreciate your help. This is a weird one. Is your PHP script like the one Peter posted? On 8/20/2015 10:30 PM, Charles Warwick wrote: That script works here with HTTPS, I am guessing there is something else specific about the configuration. On

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread J. Landman Gay
On 8/20/2015 10:23 PM, Peter W A Wood wrote: Jacque This works fine in LiveCode 7.0.3. I’ll download 7.1RC1 and see if it works there too. Apart from the difference in LiveCode versions, there is one other difference that may be significant. I am using HTTP on my machine not HTTPS. There

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread Peter W A Wood
that all servers expect to receive UTF-8. The character encoding can be specified in configuration files. Thanks very much to you and Charles for your tests. I agree with Charles that it may indicate there is something wrong with the PHP script. If I give him the simple echo script that you

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread Peter W A Wood
Jacque This works fine in LiveCode 7.0.3. I’ll download 7.1RC1 and see if it works there too. Apart from the difference in LiveCode versions, there is one other difference that may be significant. I am using HTTP on my machine not HTTPS. There have been some bugs in LiveCode 7 HTTPS

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread Monte Goulding
On 21 Aug 2015, at 10:58 am, Peter W A Wood peterwaw...@gmail.com wrote: put textEncode({ quote é quote : 1}, UTF-8) into tJSON put json= before tJSON post URLEncode(tJSON) to URL http://Localhost/jacque.php http://localhost/jacque.php put textDecode(it, UTF-8”) You would want

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread Monte Goulding
Just before posting can you dump your tData variable into a binfile and send it to me. It's got to be something simple... Sent from my iPhone On 21 Aug 2015, at 8:33 am, J. Landman Gay jac...@hyperactivesw.com wrote: Thanks, but still no go. I get the same errors. Is anyone posting from

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread Monte Goulding
On 21 Aug 2015, at 9:25 am, Peter W A Wood peterwaw...@gmail.com wrote: You’re content is no longer valid JSON once you have inserted the “json=“ (at the PHP developer’s request). There may be a conflict between the header and the actual content. What happens if you remove the line

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread J. Landman Gay
On 8/20/2015 6:25 PM, Peter W A Wood wrote: You’re content is no longer valid JSON once you have inserted the “json=“ (at the PHP developer’s request). There may be a conflict between the header and the actual content. What happens if you remove the line setting the httpHeaders? Thanks Peter.

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread Monte Goulding
On 21 Aug 2015, at 9:29 am, Monte Goulding mo...@sweattechnologies.com wrote: That’s a good question. I can’t see anything wrong with the JSON itself after reviewing the file. Validates and formats fine in TextMate. Are you sure they want post and not get or put? Hmm… I just remembered

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread Charles Warwick
It will still be useful… what I want to look at is what headers are generated and whether or not the JSON is still correctly formatted. With a copy of the script, I should be able to tell you what is causing it to break between the versions. I have been posting JSON data to PHP in other

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread Monte Goulding
What happens if you comment out line 247 of revLibURL stack script? textEncode native here seems to be a rather dangerous thing to do… On 21 Aug 2015, at 9:45 am, Dave Cragg dcr...@lacscentre.co.uk wrote: On 21 Aug 2015, at 00:33, J. Landman Gay jac...@hyperactivesw.com wrote: On

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread Charles Warwick
, Peter W A Wood peterwaw...@gmail.com wrote: put textEncode({ quote é quote : 1}, UTF-8) into tJSON put json= before tJSON post URLEncode(tJSON) to URL http://Localhost/jacque.php http://localhost/jacque.php put textDecode(it, UTF-8”) You would want to urlEncode tJSON before you put

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread J. Landman Gay
On 8/20/2015 8:46 PM, Charles Warwick wrote: It will still be useful… what I want to look at is what headers are generated and whether or not the JSON is still correctly formatted. With a copy of the script, I should be able to tell you what is causing it to break between the versions. I have

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread Peter W A Wood
Jacque On 21 Aug 2015, at 10:13, J. Landman Gay jac...@hyperactivesw.com wrote: Here's a test. This posts just fine in LC 6.x but fails in 7.0.6 and 7.1rc1. Make a field with this in it: [{Meals:Yes,Purpose:Business}] Now put this into a button or card script: constant

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread Charles Warwick
If you are still having issues with this, I am happy to run a packet capture against it if you give me a copy of the script… That way I can tell you what the exact difference is between what LC7 and LC6 actually post to the server… On 21 Aug 2015, at 9:50 am, Monte Goulding

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread J. Landman Gay
On 8/20/2015 6:45 PM, Dave Cragg wrote: What happens if you remove the httpHeader setting and also UrlEncode tData? Still errors I'm afraid. Monte wrote: What happens if you comment out line 247 of revLibURL stack script? textEncode native here seems to be a rather dangerous thing to do…

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread J. Landman Gay
On 8/20/2015 7:24 PM, Charles Warwick wrote: If you are still having issues with this, I am happy to run a packet capture against it if you give me a copy of the script… That way I can tell you what the exact difference is between what LC7 and LC6 actually post to the server… Actually, now

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread Charles Warwick
If I send that to a PHP script on one of my servers, I receive the JSON data correctly from LC7 in the PHP script. I will just run it against LC6 and make sure it is identical. If you want, you can post to my PHP script and then we can see how it compares between the two versions. If it works

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread Peter W A Wood
Jacque On 21 Aug 2015, at 05:53, J. Landman Gay jac...@hyperactivesw.com wrote: Here's what I do: set the httpHeaders to content-type: application/json put convertToJSON() into tData -- produces valid JSON put json= before tData post tData to kServerURL You’re content is no longer

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread Dave Cragg
On 21 Aug 2015, at 00:33, J. Landman Gay jac...@hyperactivesw.com wrote: On 8/20/2015 6:25 PM, Peter W A Wood wrote: You’re content is no longer valid JSON once you have inserted the “json=“ (at the PHP developer’s request). There may be a conflict between the header and the actual

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread Peter W A Wood
but most of the time it won't be. I ran a very simple test using the message box and a very simple PHP script. I was able to post json={JSON} to PHP and get it back. In the message box (using LC 7..0.3) post textEncode(json={ quote é quote : 1}, UTF-8) to URL http://Localhost/jacque.php

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread J. Landman Gay
On 8/20/2015 6:32 PM, Monte Goulding wrote: On 21 Aug 2015, at 9:29 am, Monte Goulding mo...@sweattechnologies.com wrote: That’s a good question. I can’t see anything wrong with the JSON itself after reviewing the file. Validates and formats fine in TextMate. Are you sure they want post and

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread J. Landman Gay
Here's a test. This posts just fine in LC 6.x but fails in 7.0.6 and 7.1rc1. Make a field with this in it: [{Meals:Yes,Purpose:Business}] Now put this into a button or card script: constant kServerURL = https://www.domain.com/results.php; --### use a valid URL here command

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread J. Landman Gay
I'm still struggling with this. I have a valid JSON string, verified by a web-checking site and by the PHP developer. He wants me to POST it this way: json=JSON string It doesn't work. He says the server receives it but it is not passed to the PHP script because the main parameter is empty.

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread Monte Goulding
Is your convertToJSON function returning UTF8? I’m not sure what LC 7 does when it concatenates “json=“ to a UTF8 string. If for example that json= is UTF16 and the rest of the data is UTF8 it’s not surprising the server is freaking out. Try: put textEncode(“json=“,”UTF8”) before tData On 21

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread J. Landman Gay
Okay, addendum: It works fine in LC 6.7.6. It fails entirely in 7.0.6. I wish I'd tried that sooner. We need 7.x because of the unicode support. On 8/20/2015 4:53 PM, J. Landman Gay wrote: I'm still struggling with this. I have a valid JSON string, verified by a web-checking site and by the

Re: JSON, URL-encode, and UTF-8

2015-08-20 Thread J. Landman Gay
Thanks, but still no go. I get the same errors. Is anyone posting from LC 7? I also just tried 7.1rc1 but it doesn't work either. On 8/20/2015 5:04 PM, Monte Goulding wrote: Is your convertToJSON function returning UTF8? I’m not sure what LC 7 does when it concatenates “json=“ to a UTF8

Importing UTF-8 files

2015-08-18 Thread J. Landman Gay
Should I be using file or binfile to retrieve unicode text from a UTF-8 text file? I thought I should be using binfile, but after textDecoding the data, text chunking and delimiters break when I do that. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software

Re: Importing UTF-8 files

2015-08-18 Thread Jerry Jensen
http://dev.himalayanacademy.com/stacks/705-Release-Unicode-Notes.pdf Swasti Astu, Be Well! Brahmanathaswami Kauai's Hindu Monastery www.HimalayanAcademy.com J. Landman Gay wrote: Should I be using file or binfile to retrieve unicode text from a UTF-8 text file? I thought I

Re: Importing UTF-8 files

2015-08-18 Thread Monte Goulding
I don't think it would hurt to use file for utf-8 Sent from my iPhone On 19 Aug 2015, at 5:41 am, J. Landman Gay jac...@hyperactivesw.com wrote: Should I be using file or binfile to retrieve unicode text from a UTF-8 text file? I thought I should be using binfile, but after textDecoding

Re: Importing UTF-8 files

2015-08-18 Thread Brahmanathaswami
to retrieve unicode text from a UTF-8 text file? I thought I should be using binfile, but after textDecoding the data, text chunking and delimiters break when I do that. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url

Re: Importing UTF-8 files

2015-08-18 Thread J. Landman Gay
On 8/18/2015 3:50 PM, Brahmanathaswami wrote: So I extracted this for my own ref http://dev.himalayanacademy.com/stacks/705-Release-Unicode-Notes.pdf Thanks for that. As Monte said, it turns out file works, but I didn't expect it because the entry for textDecode talks about binary files. If

Re: Importing UTF-8 files

2015-08-18 Thread Monte Goulding
The thing is importing using file mode changes the line endings which is perfectly fine in UTF8. It's still UTF8 afterwards which is why textDecode still works. You could just textDecode then script the replacement of the line endings but it's probably easier for the engine to do it. Sent from

JSON, URL-encode, and UTF-8

2015-08-17 Thread J. Landman Gay
I've confused myself. I need to send JSON to a server. The values will have foreign characters in them. So I think I need to use textEncode to convert it to UTF8 and also it needs to be URL encoded. Is that right? And if so, what order do I do it in? Do I URL-encode each value in the array,

Re: JSON, URL-encode, and UTF-8

2015-08-17 Thread Monte Goulding
On 18 Aug 2015, at 6:54 am, J. Landman Gay jac...@hyperactivesw.com wrote: Thanks Monte. The JSON is created by EasyJSON from a LC array. Most of the values in the array are in foreign languages with lots of non-ascii characters, and those will become the values in the parameter string

Re: JSON, URL-encode, and UTF-8

2015-08-17 Thread Monte Goulding
I think we would need to see the API to know about the urlEncoding. Is it a parameter in your query string? If you need to urlEncode it will be the last thing you do. If you are using one of the script libraries the UTF8 encoding may be done for you. If you are using mergJSON then UTF8 encode

Re: JSON, URL-encode, and UTF-8

2015-08-17 Thread J. Landman Gay
Thanks Monte. The JSON is created by EasyJSON from a LC array. Most of the values in the array are in foreign languages with lots of non-ascii characters, and those will become the values in the parameter string that I will send in a POST. It doesn't look like EasyJSON does any UTF8 encoding

Writing to file in utf-8

2014-09-03 Thread jbv
Hi list I have a script that accumulates successive strings into a file. Each string comes from utf-8 text files and contains french characters with accents like é à ô. After processing in the script, those strings get accumulated in other txt files. I need these second serie of files

Re: Writing to file in utf-8

2014-09-03 Thread Mark Schonewille
for the Real Beginner http://qery.us/3fi LiveCode on Facebook: https://www.facebook.com/groups/runrev/ On 9/3/2014 13:28, j...@souslelogo.com wrote: Hi list I have a script that accumulates successive strings into a file. Each string comes from utf-8 text files and contains french characters

Re: Writing to file in utf-8

2014-09-03 Thread jbv
Hi Mark, Thanks for your reply, and sorry for the missing information. I am on Mac OSX with LC 6.5.2. But a solution that works on different platforms would be nice. As I said, the contents of variable it come from files, which I assume are in utf-8 (when I open them in BBedit or TextWrangler

Re: Writing to file in utf-8

2014-09-03 Thread Mark Schonewille
, and sorry for the missing information. I am on Mac OSX with LC 6.5.2. But a solution that works on different platforms would be nice. As I said, the contents of variable it come from files, which I assume are in utf-8 (when I open them in BBedit or TextWrangler, it says UTF-8, presumably MacRoman

Re: Writing to file in utf-8

2014-09-03 Thread jbv
___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Writing to file in utf-8

2014-09-03 Thread Trevor DeVore
On Wed, Sep 3, 2014 at 7:28 AM, j...@souslelogo.com wrote: I have a script that accumulates successive strings into a file. Each string comes from utf-8 text files and contains french characters with accents like é à ô. After processing in the script, those strings get accumulated in other

Re: Writing to file in utf-8

2014-09-03 Thread Mark Schonewille
from utf-8 text files and contains french characters with accents like é à ô. After processing in the script, those strings get accumulated in other txt files. I need these second serie of files to be in utf-8 format too. ... put (unidecode(it,utf8) return) after url tPath Why are you

Re: Writing to file in utf-8

2014-09-03 Thread jbv
Hell Trevor Why are you using unidecode? I am using unidecode because 1- in this LC lesson http://lessons.runrev.com/m/4071/l/20441-unicode it says : The keys to using UTF-8 text in Livecode are the uniEncode() and uniDecode() functions. Let's say you've gotten some UTF-8 text from a web site

Re: Writing to file in utf-8

2014-09-03 Thread jbv
He wants UTF8 files. Another possibility could be, after all processing is done for each xml tree, to replace all weird unicode chars like Été by its equivalent (é in that case) before saving to the final file... It's not very elegant and a rather brute-force approach but it might work,

Re: Writing to file in utf-8

2014-09-03 Thread Mark Schonewille
for a quote. On 3 sep 2014, at 19:02, j...@souslelogo.com wrote: Hell Trevor Why are you using unidecode? I am using unidecode because 1- in this LC lesson http://lessons.runrev.com/m/4071/l/20441-unicode it says : The keys to using UTF-8 text in Livecode are the uniEncode

Re: Writing to file in utf-8

2014-09-03 Thread jbv
Hello Mark Yes you understood me well : the original xml files are in UTF8 and the DB format is UTF8 too. So it seems logical to try to preserve UTF8 through the whole process... Best jbv Hi jbv, I suggested this, because I understand from you that you need UTF8 for the files and the

Decode UTF-8 in variable ?

2013-06-20 Thread Ludovic Thébault
Hello, I need to get datas from sqlite (in UTF-8) and convert it in ASCII for treatment, but i don't need to put it in a field.. I try unidecode(uniencode(myTXT, utf8)) and many others solutions with no result. We need to pass by a field ? with this command : set the unicodetext of field xxx

Re: Decode UTF-8 in variable ?

2013-06-20 Thread Mark Schonewille
from sqlite (in UTF-8) and convert it in ASCII for treatment, but i don't need to put it in a field.. I try unidecode(uniencode(myTXT, utf8)) and many others solutions with no result. We need to pass by a field ? with this command : set the unicodetext of field xxx to .. ? Thanks

Re: Decode UTF-8 in variable ?

2013-06-20 Thread Ludovic Thébault
Le 20 juin 2013 à 10:55, Mark Schonewille a écrit : Hi Ludovic, You don't need to set the text to a unicode string to be able to use it. What you are doing seems correct, although you don't say if you're storing the value returned in a variable: put uniDecode(uniEncode(myTxt,UTF8))

Re: Decode UTF-8 in variable ?

2013-06-20 Thread Mark Schonewille
hi Ludovic, Maybe the database isn't UTF8 encoded. What is the operating system of the computer on which it works an what is the OS of the computer on which it doesn't work? -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage:

Re: Decode UTF-8 in variable ?

2013-06-20 Thread Dar Scott
You might be able to work with it as it is. In UTF-8 the ASCII subset looks just like ... ASCII. All characters represented by UTF-8 that are not ASCII are represented by one to three bytes with the high bit set, that is, the byte value of each byte in the sequence is over 127. All ASCII

Working with tab data and utf-8

2011-10-25 Thread Giuseppe
Hi all, I'm having a little problem I don't understand. With this code put SELECT * from empresas WHERE nif = ' pID ' into theSQL put revDataFromQuery(tab, cr, sDatabaseID, theSQL) into theData I get this in a variable theData 2123456789Empresa 2Empresa 2Dirección

Re: Working with tab data and utf-8

2011-10-25 Thread Klaus on-rev
Buonasera Giuseppe, Am 25.10.2011 um 18:37 schrieb Giuseppe: Hi all, I'm having a little problem I don't understand. With this code put SELECT * from empresas WHERE nif = ' pID ' into theSQL put revDataFromQuery(tab, cr, sDatabaseID, theSQL) into theData I get this in a

Re: Working with tab data and utf-8

2011-10-25 Thread Devin Asay
On Oct 25, 2011, at 10:37 AM, Giuseppe wrote: Hi all, I'm having a little problem I don't understand. With this code put SELECT * from empresas WHERE nif = ' pID ' into theSQL put revDataFromQuery(tab, cr, sDatabaseID, theSQL) into theData I get this in a variable theData

Re: Working with tab data and utf-8

2011-10-25 Thread Mark Schonewille
Hi Giuseppe, For plain text, you can use: set the itemDel to tab put item 2 of theData into field cif of group controles empresa I'm not sure that the UTF8 returned by MySQL is read correctly by LiveCode. If LiveCode reads it correctly, you can do: set the unicodeText of fld cif of grp

  1   2   >