Recent

Author Topic: [SOLVED] order letter ñ  (Read 1947 times)

pbruccoleri

  • New Member
  • *
  • Posts: 28
[SOLVED] order letter ñ
« on: October 05, 2012, 06:56:04 pm »
Hello..
I use: Lazarus 0.9.31 r30432 FPC 2.5.1 i386-win32-win32/win64 and ZEOS 7.0.0
Firebird 2.1.4- The database ir UTF8

I have a dbgrid, the TZqlquery associated have de sql text: select * from articulo order by descripcion

but, the order is incorrect:
ZAPALITOS
ZILLERTAL
ÑOQUIS

what is the solution?
I use the IBExpert version 2012.9.2.1 and the result is the same when i execute the same query.
very thanks
« Last Edit: October 06, 2012, 01:23:42 am by pbruccoleri »

taazz

  • Hero Member
  • *****
  • Posts: 5363
Re: order letter ñ
« Reply #1 on: October 05, 2012, 07:14:14 pm »
the problem is in your database post the fields DML with the  character set and collation it uses. the most obvious solution is to use a different collation that knows how to sort correctly you language. But I have no idea about that character or what is the correct collation to use.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Zoran

  • Hero Member
  • *****
  • Posts: 1461
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: order letter ñ
« Reply #2 on: October 05, 2012, 07:24:36 pm »
Try to change the SQL this way (add collate option to order by clause):
Code: [Select]
select * from articulo order by descripcion collate unicode

pbruccoleri

  • New Member
  • *
  • Posts: 28
Re: order letter ñ
« Reply #3 on: October 06, 2012, 01:23:18 am »
Hello..
with collate UNICODE was perfect!
very tnanks