Lazarus

Programming => Operating Systems => Android => Topic started by: xinyiman on November 15, 2019, 11:43:33 am

Title: LAMW json utf-8 problem
Post by: xinyiman on November 15, 2019, 11:43:33 am
Hi guys, I have a problem with manipulating JSONs in android. I practically lose support for utf8. I don't understand why. I gave an example. Just press the button and you will see that the first showmessage correctly displays the values. While the following showmessages when they have to display the name I get the wrong value. I don't understand why. Ideas?
Title: Re: LAMW json utf-8 problem
Post by: A.S. on November 16, 2019, 08:47:34 pm
I think you have a problem in source (see attached picture -- from Lazarus IDE Source Editor)
Title: Re: LAMW json utf-8 problem
Post by: xinyiman on November 17, 2019, 01:54:34 pm
I don't understand what the problem is in the source. The string displays it correctly with the first showmessage. The problem is later.
Title: Re: LAMW json utf-8 problem
Post by: xinyiman on November 18, 2019, 12:27:36 pm
No suggestion?
Title: Re: LAMW json utf-8 problem
Post by: xinyiman on November 19, 2019, 11:07:28 am
Solved, it was enough to add the LazUtils requirement and in the controls.lpr file put the LazUTF8 unit. I foolishly did tests on a Mac with a newer version of FPC than the one that uses LAMW on ubuntu. Arcanum solved.
TinyPortal © 2005-2018