Wednesday, March 28, 2012

Problem in displaying or inserting data into sqlserver tables using utf

i have such a error in my sql server db
i examined arabic_ci_as and SQL_Latin1_General_CP1256_CI_AS
but in my web pages that uses utf-8 codepage that retrieves data using ado and asp scripting the ouput or inserted that dispalyed in both of query analyzer and Enterprise manager replaces or display '???' for characters .
i am using nchar and nvarchar and ntextany one to help me i need it emergenciely
with thanks arqa|||Originally posted by arqa
i have such a error in my sql server db
i examined arabic_ci_as and SQL_Latin1_General_CP1256_CI_AS
but in my web pages that uses utf-8 codepage that retrieves data using ado and asp scripting the ouput or inserted that dispalyed in both of query analyzer and Enterprise manager replaces or display '???' for characters .
i am using nchar and nvarchar and ntext

i must add that i am using with farsi localization winserver 2k|||How about status of windows locale?

It is required to install Arabic language support on OS part.

Do not use an Arabic name for the SQL server.
For further details, please refer to the SQL server and Arabic support whitepaper below: http://www.microsoft.com/middleeast/arabicdev/dotnetservers/SQL
/wpapers.asp#sql_arabicsupport_installingsqlserver
The windows code page must be the same on both the server and the client.

The recommended is standard Arabic code page is 1256.|||hi satya thanks to your answer

i am already localized my windows to farsi(arabic) and i have not any problem with typing in farsi and local setting but i dont know how i can
setup(!) arabic(farsi) in remote sqlserver is because it is far from me and i have not any control and you think realy i need to do such a thing or no becuse the remote server hosts large number of databases in deffernet code page and the os not reachable(!?) .
other thing is that how i can use same code page to client and server
in this case i am using a sqlserver for hosting my data gather from a website in other host that is far away other this is that this page must viewed by any users that may not localized windows or OS i use it for a web site and for a web based goal i think i must use unicode code page for this utf-8 and i must use such a code page in both sql server and
my webpages to display informations(data) in none localized OS or
systems but know i dont know what i must to do the below code is peace of code that i used to create table in remote server
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Member_Info]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Member_Info]
GO
CREATE TABLE [dbo].[Member_Info] (
[id] [bigint] IDENTITY (1, 1) NOT NULL ,
[First] [nvarchar] (50) COLLATE Arabic_CI_AS NULL ,
[Last] [nvarchar] (50) COLLATE Arabic_CI_AS NULL ,
[Father_Name] [nchar] (50) COLLATE Arabic_CI_AS NULL ,
[Date_Birth] [decimal](18, 0) NULL ,
[Birt_num] [bigint] NULL ,
[Birt_Place] [nvarchar] (50) COLLATE Arabic_CI_AS NULL ,
[Mariage_Condition] [nvarchar] (50) COLLATE Arabic_CI_AS NULL ,
[Colg_cond] [nchar] (20) COLLATE Arabic_CI_AS NULL ,
....................
i am examined
sql_latin1_general_cp1256 for this manner but is not fullfil me and the results is not defferent and not changed(!?)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
i have some question that is i install arabic is that
and other thing that i confused arabic name i dont use arbic name for
dose it mean a database name such as members_db or other things but i am using english name for my db name and tables name and collmns name and the only thing must be none english is the data is inserted into tables.|||Thanx for Your Attention.
i am study more about this problem but suddenly i cant solve it but i am grasp some new thing about .
i am using A FORM page AND a Insert Page (USING ASP/ADO SCRIPTING) and
Unicode (utf-8) Code Page In Both Page AND ARABIC_CI_AS Collation And nvarchar() ans nchar data Type In SQLSERVER Ta i am get the below results.
1.when i am using This<% @.CODEPAGE="65001" %> directive In Both Page The Insert Data is Simlar To '??' And all characters Replaced With '?'s and it is Wrong And In My Webpages Displayed Like '??' When i remove
the code page directive in second page(Insertion Page) The Data is Inserted and Displayed correct in webpage but i cant see it in Enterprise Manager but in this manner the data isn't display like before but like a manner that code page(collation) is not correct in my client computer becuse i am examined a query that compare and its work correctly (My Computer Locals is Farsi) how i can solve this problem PLEASE CONTACT ME VIA EMAIL .
thanks

No comments:

Post a Comment