Results 1 to 11 of 11
  1. #1
    Join Date
    May 2006
    Posts
    1

    Unanswered: Store Arabic in Database

    How do you setup your database to allow storing languages such as Arabic?

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Change your column definitions for the columns you need to store Arabic (or any kind of Unicode) from CHAR/VARCHAR to NCHAR/NVARCHAR and you're in business.

    -PatP

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Use NCHAR and NVARCHAR datatypes rather than CHAR and VARCHAR. Read up on Unicode datatypes.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    11:11 vs 11:11. Closest snipe ever!
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  5. #5
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Yeah, we'll call that one a draw, but VBulletin won't display the posts side by side.

    -PatP

  6. #6
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    I think my post should be first, as the second sort order should be alphabetic.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  7. #7
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Have at it bubba! If you've got some spare time to work on this issue, and are willing to spend that time working on it, be my guest!

    -PatP

  8. #8
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    <stretch>But alphabetically the color of Pat's name (Maroon) comes before your color (Orange)</stretch>

  9. #9
    Join Date
    Feb 2003
    Location
    India
    Posts
    216
    while nchar & nvarchar is enough to store any language data, dont think thats the end of it.

    dont forget to check "SQL Server Collation". your Arabic client might shout about the sort order (dont understand Arabic? dont worry i too dont ) and language option setting as well.

    try this out

    SET LANGUAGE N'Arabic'
    select datename(mm,getdate())

  10. #10
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I'm not sure that I follow your comment about sort order. If you use NVARCHAR, you'll get a Unicode sort on that column (unless you specifically force another collation), which will sort the Arabic text correctly. Did I miss something?

    -PatP

  11. #11
    Join Date
    Feb 2003
    Location
    India
    Posts
    216
    not always sort order is arranging things in the character-code order. say in case of english we have both case-sensitive and case-insensitive sorting & matching (finding). there could be accent-sensitive or accent-insensitive behavior as well. though i do not have ideas about what all and else is applicable for Arabic, but generally i believe it should get mapped with a collation.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •