How could I generate an index for Lianja data table that also handles Hungarian accented characters?
In VFP exists the INDEX ON ... COLLATE HUNGARIAN option, and the sys (15, ...) function. Is there a similar possibility in Lianja?
How could I generate an index for Lianja data table that also handles Hungarian accented characters?
In VFP exists the INDEX ON ... COLLATE HUNGARIAN option, and the sys (15, ...) function. Is there a similar possibility in Lianja?
Last edited by strato; 2021-08-29 at 03:00.
Lianja handles Utf-8 encoded data automatically. You just create an index on a column and it will be stored as utf-8 in the indexes. You don’t need to use national character sets.
Principal developer of Lianja, Recital and other products
Follow me on:
Twitter: http://twitter.com/lianjaInc
Facebook: http://www.facebook.com/LianjaInc
LinkedIn: http://www.linkedin.com/in/barrymavin
unfortunately, utf-8 encoding does not solve this problem. The Hungarian accented letters in utf-8 code have 2 bytes, the first byte has an ascii code of 195, so these letters are all at the end of the ABC
Sorry I do not understand what you mean.
As I’ve already explained and you already should know Lianja uses Utf-8 to represent all Unicode characters. By using Utf-8 all characters for all languages even mixed languages can be used without having to decipher code pages.
So no you cannot create indexes using language specific code pages.
Principal developer of Lianja, Recital and other products
Follow me on:
Twitter: http://twitter.com/lianjaInc
Facebook: http://www.facebook.com/LianjaInc
LinkedIn: http://www.linkedin.com/in/barrymavin
probably it's my fault if I'm not well understood.
Here's an example that might help you understand my problem:
The result:Code:open database southwind insert into employees (firstname, lastname) values ("Áron", "Örkény") use employees index on firstname tag firstname list firstname
(Expected order: Andrew, Anne, Áron, Janet .... etc)Code:Record # firstname 5 Andrew 4 Anne 7 Janet 2 Laura 8 Margaret 9 Michael 3 Nancy 6 Robert 1 Steven 18 Áron
Yes the collating/sort order in Lianja is Utf-8 encoding order. It does not affect index searches.
if that’s not what you need then the only solution would be to add a collate() function that would add strings into the index in the desired order.
That would need an ER to be submitted and it would be considered for implementation in a future release.
Principal developer of Lianja, Recital and other products
Follow me on:
Twitter: http://twitter.com/lianjaInc
Facebook: http://www.facebook.com/LianjaInc
LinkedIn: http://www.linkedin.com/in/barrymavin
This has been implemented in Lianja 6.3
1. Added new command SET COLLATE TO "language"
2. Added new function COLLATE( cExp ) // use this in your indexes
Principal developer of Lianja, Recital and other products
Follow me on:
Twitter: http://twitter.com/lianjaInc
Facebook: http://www.facebook.com/LianjaInc
LinkedIn: http://www.linkedin.com/in/barrymavin
thanks Barry!![]()
Bookmarks