Hi,

I am now using 1256; i mean, I have set the locale to
farsi before installing SQL Server, and I am using the
non unicode types (char, instead of nchar). so I will
have not problem with G-CH-P-JH and they are in the
correct place! (Actually i am not sure about the real
reason).

I think it will be possible to apply a similar trick,
when using unicode. i.e. using a function to map
unicode characters to our correctly sorted order (a
0..255 HashTable). The convertion will result in the
loss of data, but there will be no problem if we want
to use it only in the ORDER BY clause.

Let me know what is your idea.

--- Behdad Esfahbod <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> Nice idea, this is the same as what I'm going to
> implement for
> postgresql, BTW, does it support PE, CHE, ... too?
> 
> 
> On Mon, 24 Jun 2002, Hamidreza Younesy Aghdam wrote:
> 
> > Hi,
> > 
> > Fortunately I found some kind of solution for the
> > sorting problem, just after sending the mail. I
> was
> > mixied with this problem for more than a week, but
> i
> > don't know why I must find the answer after
> sending
> > the question (beleive me)! May be some kind of
> holy
> > spirit on this mailing list ;)
> > 
> > As I had talked personaly to some of the friends
> in
> > this list before and we didn't find a reasonable
> > solution, I hope this may be useful for some of
> you:
> > 
> > 1. create a userdefined function:
> > 
> > CREATE FUNCTION CorrectSort (@field char(100))
> > RETURNS char(100)
> > AS
> > BEGIN
> >   RETURN REPLACE(REPLACE((REPLACE(REPLACE(@field,
> > 'Heh','$'
> ),'Waw','Heh')),'$','Waw'),'Keheh','Kaf')
> > END
> > 
> > use the exact farsi characted instead of the
> "Heh",
> > "Waw", "Keheh", "Kaf". use any dummy char instead
> of
> > "$") 
> > 
> > then use this function in the order by clase:
> > SELECT * FROM Personal 
> > ORDER BY CorrectSort(Lastname),
> CorrectSort(Firstname)
> > 
> >
> ----------------------------------------------------
> > 
> > BTW, I am still looking for some solution for
> > substituting the Keheh with Kaf on data entry.
> > 
> > =====
> > ....../--/|
> /--/|...................................
> > ...../  /_//  /
> /..................................
> > ..../        / /amidreza Younesy Aghdam
> > .../  ___   / /  Emails  : [EMAIL PROTECTED]
> > ../  /|_/  / /             [EMAIL PROTECTED]
> > ./__/ //__/ /omepage:http://ce.sharif.edu/~younesy
> > .|__|/
> |__|/.......................................
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! - Official partner of 2002 FIFA World Cup
> > http://fifaworldcup.yahoo.com
> > _______________________________________________
> > FarsiWeb mailing list
> > [EMAIL PROTECTED]
> > http://lists.sharif.edu/mailman/listinfo/farsiweb
> > 
> 
> -- 
> Behdad Esfahbod                               4 Tir 1381, 2002 Jun 25 
> http://behdad.org/                    [Finger for Geek Code]
> 
> Debug is human, de-fix divine.
> 


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
_______________________________________________
FarsiWeb mailing list
[EMAIL PROTECTED]
http://lists.sharif.edu/mailman/listinfo/farsiweb

Reply via email to