This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Kubernetes in Action and have Marko Luksa on-line!
See this thread for details.
Win a copy of Kubernetes in Action this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Arabic characters in MS sql  RSS feed

 
Ranch Hand
Posts: 492
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys ,

Is there a way to store Arabic characters in MS sql , because i;m trying to insert now arabic but it appears as "?"
PS: i don't wanna reinstall the MS sql

 
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

It's possible yes, you really need to read this
 
S Shehab
Ranch Hand
Posts: 492
Android Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Martijn Verburg wrote:Hi there,

It's possible yes, you really need to read this



Hi ,

the problem is that when you try to preview the data written in arabic from sql client you will find it "?" , so i searched how to solve this all the solutions i found to uninstall the MS sql then change the regional setting to arabic then install MS sql again , but i dont wanna do that , i wanna s solution to see these arabic character with out uninstall
 
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you read the article? It is a fairly comprehensive description of what is causing your problem.

You shouldn't need to uninstall the SQL Server client tools (and certainly you don't need to uninstall SQL Server it supports Arabic fine). Microsoft applications will all pick up the regional settings if you change them without needing reinstalled.

Assuming your data model uses a unicode data type to store the data and your client can support Arabic you should be able to see it fine.
 
Sheriff
Posts: 21187
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may have to change the collation of your database. By default it is probably set to some Latin1 collection (e.g. SQL_Latin1_General_CP1_CI_AS).

Moving to JDBC.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This shouldn't matter. The collation only applies to text manipulation logic (sorting and the like) and shouldn't affect the underlying data - unless you use a TSQL function that also relies on the collation to manipulate the data. For example I'm currently looking at Arabic data in a SQL Server instance that has a Latin1_General_CI_AS collation.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!