Re: [fpc-pascal] Cannot write datetime field on sqlite3 database on ARM

2021-03-07 Thread Michael Van Canneyt via fpc-pascal
On Mon, 8 Mar 2021, Toru Takubo via fpc-pascal wrote: Hi, I am developing my app on Windows and building apps for other platforms by using cross compiler. Now I have a problem only occurred on Linux ARM. The problem is that it cannot write datetime field on sqlite3 database. It can read/writ

[fpc-pascal] Cannot write datetime field on sqlite3 database on ARM

2021-03-07 Thread Toru Takubo via fpc-pascal
Hi, I am developing my app on Windows and building apps for other platforms by using cross compiler. Now I have a problem only occurred on Linux ARM. The problem is that it cannot write datetime field on sqlite3 database. It can read/write other fields like int, varchar or blob, but always write

Re: [fpc-pascal] Unicode chars losing information

2021-03-07 Thread Marco van de Voort via fpc-pascal
Op 2021-03-07 om 22:26 schreef Bart via fpc-pascal: On Sun, Mar 7, 2021 at 5:31 PM Marco van de Voort via fpc-pascal wrote: Probably it is not in the BMP and thus needs more position than one. Length(Char) is 5 according to fpc, I see 5 "graphemes" Indeed: .Ld1$strlab:     .short    1200,

Re: [fpc-pascal] Unicode chars losing information

2021-03-07 Thread Bart via fpc-pascal
On Sun, Mar 7, 2021 at 5:31 PM Marco van de Voort via fpc-pascal wrote: > Probably it is not in the BMP and thus needs more position than one. Length(Char) is 5 according to fpc, I see 5 "graphemes", which suggest that all of them fit into 1 WideChar? -- Bart __

Re: [fpc-pascal] Unicode chars losing information

2021-03-07 Thread Nikolay Nikolov via fpc-pascal
On 3/7/21 7:21 PM, Ryan Joseph via fpc-pascal wrote: On Mar 7, 2021, at 10:11 AM, Marco van de Voort via fpc-pascal wrote: Yes it is. And there are about 1114000 unicode codepoints, or about 17 times what fits in a 2-byte wide char. https://en.wikipedia.org/wiki/Code_point https://en.wi

Re: [fpc-pascal] Unicode chars losing information

2021-03-07 Thread Ryan Joseph via fpc-pascal
> On Mar 7, 2021, at 10:21 AM, Ryan Joseph wrote: > > I thought unicode strings "just worked" but maybe that's UTF-8 and the > character I want is maybe UTF-16. What are you supposed to do then? > UnicodeString knows how to print the full string so all the data is there but > I can't index t

Re: [fpc-pascal] Unicode chars losing information

2021-03-07 Thread Ryan Joseph via fpc-pascal
> On Mar 7, 2021, at 10:11 AM, Marco van de Voort via fpc-pascal > wrote: > > > Yes it is. And there are about 1114000 unicode codepoints, or about 17 times > what fits in a 2-byte wide char. > > https://en.wikipedia.org/wiki/Code_point > > https://en.wikipedia.org/wiki/UTF-16 I thought u

Re: [fpc-pascal] Unicode chars losing information

2021-03-07 Thread Marco van de Voort via fpc-pascal
Op 2021-03-07 om 17:38 schreef Ryan Joseph via fpc-pascal: On Mar 7, 2021, at 9:31 AM, Marco van de Voort via fpc-pascal wrote: Probably it is not in the BMP and thus needs more position than one. Isn't char[1] a 2 byte wide char? Not sure I understand "more position than on" though. Ye

Re: [fpc-pascal] Unicode chars losing information

2021-03-07 Thread Ryan Joseph via fpc-pascal
> On Mar 7, 2021, at 9:31 AM, Marco van de Voort via fpc-pascal > wrote: > > Probably it is not in the BMP and thus needs more position than one. Isn't char[1] a 2 byte wide char? Not sure I understand "more position than on" though. Regards, Ryan Joseph ___

Re: [fpc-pascal] Unicode chars losing information

2021-03-07 Thread Marco van de Voort via fpc-pascal
Op 2021-03-07 om 17:21 schreef Ryan Joseph via fpc-pascal: I came across a bug which was caused but a unicode character losing information and narrowed it down to this. Why doesn't the chars[1] print the same character as appeared in the string? var chars: UnicodeString; begin chars :=

[fpc-pascal] Unicode chars losing information

2021-03-07 Thread Ryan Joseph via fpc-pascal
I came across a bug which was caused but a unicode character losing information and narrowed it down to this. Why doesn't the chars[1] print the same character as appeared in the string? var chars: UnicodeString; begin chars := '⌘⌥⌫⇧^'; writeln(chars); writeln(chars[1]); end. Prints: