Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes JDBC and the fly likes JDBC connection and sql server r2 arabic issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC connection and sql server r2 arabic issue" Watch "JDBC connection and sql server r2 arabic issue" New topic

JDBC connection and sql server r2 arabic issue

Rita Chammas

Joined: Dec 05, 2012
Posts: 1
Below is a description of our problem in using the JDBC connection to retrieve Arabic data from sql server 2008 r2 database in a powerbuilder 9 application.

1. powerbuilder 9 application
2. Sql server 2008 r2 database:
a. collation: Arabic_CI_AS
3. Microsoft JDBC driver
We have an issue in retrieving/writing Arabic data to the database using JDBC connection inside powerbuilder 9 application.
Arabic Data is committed to the database using an ODBC connection correctly in the powerbuilder application; however we need to use JDBC connection to read the Arabic data but it is displayed as question marks (??? ???).
After research we have tried the below properties to solve the issue which none resolved it:
1. useUnicode=yes;
2. charSet=utf8; charSet=utf-8; charSet=windows1256; charSet=CP1256;
3. CodePageOverride=utf8; CodePageOverride=utf-8; CodePageOverride= windows1256; CodePageOverride= CP1256;
4. characterEncoding=UTF8; characterEncoding =utf-8; characterEncoding = windows1256; characterEncoding = CP1256;

• we can insert/retrieve Arabic data through an ODBC connection succesfully.
• We have queried the data in SQL Server Management Studio: • If the data is inserted using a JDBC connection the query will retrieve ‘??? ???’
• If the data is inserted using an ODBC connection, and retrieved using a JDBC connection it will be ‘??? ???’

It is sure that the font used in PB can display Arabic characters properly. we have tried to read Arabic characters from a string successfully.

Your PROMPT help is much appreciated ASAP.
I agree. Here's the link:
subject: JDBC connection and sql server r2 arabic issue
Similar Threads
arabic data from the database
MySQL and reading non-English characters in UTF-8
Arabic encoding
New Tomcat 5.5.17 ?
Inserting Japanese text into Oracle database