Re: LC Server UT08 Encode Error
Yes. A0 looks like the middle of a sequence of UTF-8 bytes for one character. Hitting that will cause an error. I wonder why the db complained about CA and 59. > On Sep 13, 2019, at 4:10 PM, Rick Harrison via use-livecode > wrote: > > Hi Bob and Dar, > > Thanks for getting back to me on this. > > After going through the LC list archives, > I came across a helpful tool called > "Unicode Checker” that was originally > suggested by Richmond Mathewson. > (Thanks for that by the way.) > > There is a nice little utility inside of it that > allowed me to compare the string from > Pages that I pasted to the the string that > I had cleaned with BBEdit. The only > differences found was a 000A > and a few 00A0 (NO-BREAK SPACEs). > > I suspect it is the control character really > screwing things up. (I don’t know how > it got into the string.) > > I am not using the accept-charset attribute > in the statement. If not specified > it is supposed to use the default which I’m > guessing is UTF-8. I supposed I could try > a test with the attribute specified to see if > it makes any difference. > > Thanks, > > Rick > > >> On Sep 13, 2019, at 5:36 PM, Dar Scott Consulting via use-livecode >> wrote: >> >> When you Zap Gremlins, are you removing non-ASCII or converting to ASCII? >> Maybe you can do the same thing before saving to the db. >> >> Codes 0xca 0x59 do form an invalid UTF-8 sequence. They are good letters in >> both Latin-1 and CP1252, so I'm not getting a hint. >> >> Wild, wild guess... Are you using an accept-charset attribute in ? >> Maybe fiddling with that will help. >> > > > ___ > 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 > ___ 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: LC Server UT08 Encode Error
Hi Bob and Dar, Thanks for getting back to me on this. After going through the LC list archives, I came across a helpful tool called "Unicode Checker” that was originally suggested by Richmond Mathewson. (Thanks for that by the way.) There is a nice little utility inside of it that allowed me to compare the string from Pages that I pasted to the the string that I had cleaned with BBEdit. The only differences found was a 000A and a few 00A0 (NO-BREAK SPACEs). I suspect it is the control character really screwing things up. (I don’t know how it got into the string.) I am not using the accept-charset attribute in the statement. If not specified it is supposed to use the default which I’m guessing is UTF-8. I supposed I could try a test with the attribute specified to see if it makes any difference. Thanks, Rick > On Sep 13, 2019, at 5:36 PM, Dar Scott Consulting via use-livecode > wrote: > > When you Zap Gremlins, are you removing non-ASCII or converting to ASCII? > Maybe you can do the same thing before saving to the db. > > Codes 0xca 0x59 do form an invalid UTF-8 sequence. They are good letters in > both Latin-1 and CP1252, so I'm not getting a hint. > > Wild, wild guess... Are you using an accept-charset attribute in ? > Maybe fiddling with that will help. > ___ 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: LC Server UT08 Encode Error
When you Zap Gremlins, are you removing non-ASCII or converting to ASCII? Maybe you can do the same thing before saving to the db. Codes 0xca 0x59 do form an invalid UTF-8 sequence. They are good letters in both Latin-1 and CP1252, so I'm not getting a hint. Wild, wild guess... Are you using an accept-charset attribute in ? Maybe fiddling with that will help. > On Sep 12, 2019, at 7:21 PM, Rick Harrison via use-livecode > wrote: > > I am having a problem with LC Server > posting data to my Postgresql database. > (LC Server version 9.0.4) > > If I type into a form field such as for > a field named “description”, and submit > the field, it goes into the database without > any problems whatsoever. > > If I compose a description in an application > such as Apple’s Pages or in Text Edit, and > then copy and paste the text into the > description field. It throws an error. > > ERROR: invalid byte sequence for > encoding "UTF8": 0xca 0x59 (0) > > Of course due to this error the > record never gets written out to > the database. > > I know this error is due to gremlins > in the text because if I zap gremlins > with BBEdit and then copy and > paste into the field, everything > works fine! > > I’m sure that other users will > probably use a copy and paste > method at some point, so I need > to scrub the data somehow to > prevent the error from occurring. > > Or is this an encoding/decoding > problem requiring some other > solution? > > Suggestions? > > Rick > ___ > 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 > ___ 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: LC Server UT08 Encode Error
Based on the source of the data, I'm going to say it's an encoding issue. I cannot imagine that pages is embedding non-printing characters that get past the clipboard. Bob S > On Sep 12, 2019, at 18:21 , Rick Harrison via use-livecode > wrote: > > I am having a problem with LC Server > posting data to my Postgresql database. > (LC Server version 9.0.4) > > If I type into a form field such as for > a field named “description”, and submit > the field, it goes into the database without > any problems whatsoever. > > If I compose a description in an application > such as Apple’s Pages or in Text Edit, and > then copy and paste the text into the > description field. It throws an error. > > ERROR: invalid byte sequence for > encoding "UTF8": 0xca 0x59 (0) > > Of course due to this error the > record never gets written out to > the database. > > I know this error is due to gremlins > in the text because if I zap gremlins > with BBEdit and then copy and > paste into the field, everything > works fine! > > I’m sure that other users will > probably use a copy and paste > method at some point, so I need > to scrub the data somehow to > prevent the error from occurring. > > Or is this an encoding/decoding > problem requiring some other > solution? > > Suggestions? > > Rick > ___ > 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 ___ 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
LC Server UT08 Encode Error
I am having a problem with LC Server posting data to my Postgresql database. (LC Server version 9.0.4) If I type into a form field such as for a field named “description”, and submit the field, it goes into the database without any problems whatsoever. If I compose a description in an application such as Apple’s Pages or in Text Edit, and then copy and paste the text into the description field. It throws an error. ERROR: invalid byte sequence for encoding "UTF8": 0xca 0x59 (0) Of course due to this error the record never gets written out to the database. I know this error is due to gremlins in the text because if I zap gremlins with BBEdit and then copy and paste into the field, everything works fine! I’m sure that other users will probably use a copy and paste method at some point, so I need to scrub the data somehow to prevent the error from occurring. Or is this an encoding/decoding problem requiring some other solution? Suggestions? Rick ___ 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