help required unicode problem RRS feed

  • Question

  • User-1090380879 posted

    I have developed an application in asp3.0 using Unicode with charset=utf-8 . My native language is urdu and I developed the application in urdu the data present in data base is in this format بین الاقوامی خبریں when I am fetching this data on asp3.0 page I am using metatag <Meta http-equiv="Content-Type" content="text/html; charset=utf-8"> its display the desired result what I want as بین الاقوامی خبریں


    Now I am going to upgrade this application with asp.net 1.3 I make an interface to enter the data in database and the data enter the database is in format of بین الاقوامی خبریں instead of بین الاقوامی خبریں when I am fetching this data on asp.net it’s showing correctly but when I am fetching this data on asp3.0 its showing me ????????? in the similar way when I am fetching the data enter by asp3.0 in asp.net is showing as it is reside in database i.e بین الاقوامی خبریں  not showing بین الاقوامی خبریں

    <O:P> </O:P>

    could  Anyone help me what I do to access my all records over 30,000 in asp.net with correct format

    Tuesday, November 28, 2006 7:51 AM

All replies

  • User1416329745 posted

    There is a locale ID defined for Urdu in Windows you will find it in the first link, the second link shows you how to save you code with encoding and let you choose the editor to use so you can avoid character conversion.  VS2005 advanced option let you save your code with the Urdu code page in Windows.  If you do all of the above you will avoid character conversion.







    This last link will help you understand Unicode encoding and how to use it in your application layer.  Hope this helps.


    Tuesday, November 28, 2006 12:04 PM
  • User-1090380879 posted
    Thanks for your reply but i don't have any problem inserting and fetching data in asp.net it's working very fine my actual problem is how i could retrieve my existing data from sqlserver in desired format<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
    Wednesday, November 29, 2006 6:44 AM
  • User1416329745 posted

    If you are in SQL Server 2000 and above you need to do column level collation for you data, encoding for the application layer and language specific collation in the database will remove your charater conversion you are getting now. 

    Here is what you need make your text unicode by using Nvarchar, Nchar, NText, Nvarchar (max) and Nchar (max) with Arabic column level collation and your character conversion will go away.  I have helped thousands I have not seen any that it did not help.  Post again if you still have question.




    Wednesday, November 29, 2006 10:36 AM
  • User-1090380879 posted
    I am using sqlserver 2000 with collation SQL_Latin1_General_CP1_CI_AS and Nvarchar field type.I have checked to change the collation to SQL_Latin1_General_Cp1256_CI_AS but it's still not working
    Thursday, November 30, 2006 1:19 AM
  • User1416329745 posted
    SQL_Latin1_General_CP1_CI_AS   is United States English it does not use Unicode and it also will never store Urdu correctly because Urdu is Unicode and United States English is Varchar meaning ASCII.  These problems takes attention to detail to fix, first you do ALTER Database and change the collation to what I gave you and then you go into you tables and ALTER Table and change the collation of all the columns to the collation I gave you and it will be fixed.  I have not seen a language I have not fixed in SQL Server because most known langages are defined, I helped someone use Arabic to store Farsi and it worked so go do some collation cleaning.  Hope this helps.
    Thursday, November 30, 2006 11:38 PM