[SQL] SELECT - ORDER BY Croatian characters ....
Hi everybody, I'm using PostgreSQL and my database contains Croatian Characters (čć...) so when I pose a query, and I use order by clause, the result is not sorted properly. I was using once VB for aplications and there I've used a function which changed Croatian characters with some equivalents and sorting order was ok; since now I'm using PHP, is it feasible to write such a function or is there a better solution? thanks Kornelije
[SQL] Replace function ...
Hi, I need to write a function which has to replace a character with two or three other characters I have some data in the DB and when I retrieve this data, I have sorting problems because I use specific Croatian characters I know that the DB is not setup properly, but I cannot change anything now because some data could be lost So I need to change specific Croatian characters with some other standard characters in order to sort the data properly so, if anybody knows something or has such function, please, let me know thanks R.K.
Re: [SQL] SELECT - ORDER BY Croatian characters ....
Thanks, but the problem is that I'm not using this database alone and there exist also some other users; so I've found this locale setings (lc_collate), but this cannot be changed because some indexes will be probably damaged. so database is not set up properly.. but I've started to work with this database and it cannot be changed .so I've to found some other solution .. so if you know if it's feasible to write some function.. thank you very much ;-) Kornelije On Fri, 7 May 2004, Peter Eisentraut wrote: > Kornelije wrote: > > I'm using PostgreSQL and my database contains Croatian Characters > > (ccz...) so when I pose a query, and I use order by clause, the > > result is not sorted properly. > > You need to initdb your database with the proper locale (hr_HR, > probably). Also, choose the right encoding to go along with the locale > (LATIN2?). > > ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [SQL] Replace function ...
Thank you very much, but the database I'm using is not mine that's why I cannot change anything If I wont manage to write this replace function, I'll probably use this solution ... so thank you best regards R. K. On Wed, 19 May 2004, [ISO-8859-1] Benoît BOURNON wrote: > I try to reencode postgresql db ... all is running ... in your shell : > > - pg_dump db -f fileout > > - iconv fileout i do not remember parameters but iconv converts the file. > > - createdb db -U unicode (for example) > > - pgsql db < fileout_converted > > > We change previous year the encoding of this website : www.ape-europe.org > 'iso' to 'utf8' for problems of eastern countries ... > all is running ... > > maybe you can try ... > > Kornelije wrote: > > > Hi, > > > > I need to write a function which has to replace a character with two > > or three other characters > > > > I have some data in the DB and when I retrieve this data, I have > > sorting problems because I use specific Croatian characters > > I know that the DB is not setup properly, but I cannot change anything > > now because some data could be lost > > > > So I need to change specific Croatian characters with some other > > standard characters in order to sort the data properly > > > > so, if anybody knows something or has such function, please, let me > > know > > > > thanks > > > > R.K. > > ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [SQL] Replace function ...
thanks If I don't find some other solution, I'll do it . so, thanks ... best regards Kornelije On Wed, 19 May 2004, BenLaKnet wrote: > I try to reencode postgresql db ... all is running ... in your shell : > > - pg_dump db -f fileout > > - iconv fileout i do not remember parameters but iconv converts the file. > > - createdb db -U unicode (for example) > > - pgsql db < fileout_converted > > > We change previous year the encoding of this website : www.ape-europe.org > 'iso' to 'utf8' for problems of eastern countries ... > all is running ... > > maybe you can try ... > > Kornelije wrote: > > > Hi, > > > > I need to write a function which has to replace a character with two > > or three other characters > > > > I have some data in the DB and when I retrieve this data, I have > > sorting problems because I use specific Croatian characters > > I know that the DB is not setup properly, but I cannot change anything > > now because some data could be lost > > > > So I need to change specific Croatian characters with some other > > standard characters in order to sort the data properly > > > > so, if anybody knows something or has such function, please, let me > > know > > > > thanks > > > > R.K. > > ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
