How to change character encoding of an existing database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aradhanathawait
    New Member
    • Mar 2008
    • 36

    How to change character encoding of an existing database

    Hi all,

    Can I change the character encoding of an existing database. I have to store Unicode data in the database. Please help.

    Regards,
    Aradhana
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    Originally posted by aradhanathawait
    Hi all,

    Can I change the character encoding of an existing database. I have to store Unicode data in the database. Please help.

    Regards,
    Aradhana
    I'm not sure if it can be done (I didn't find that option in manual). Of course you can change the client encoding but it is not the same. You probably will have to
    -dump all database
    -create new with encoding you want
    -restore dumped database

    Comment

    • aradhanathawait
      New Member
      • Mar 2008
      • 36

      #3
      Originally posted by rski
      I'm not sure if it can be done (I didn't find that option in manual). Of course you can change the client encoding but it is not the same. You probably will have to
      -dump all database
      -create new with encoding you want
      -restore dumped database

      Thanx a lot. If I am creating a database using "creatdb" command then where to specify character encoding? Please tell me.
      thanx & regards,
      Aradhana

      Comment

      • rski
        Recognized Expert Contributor
        • Dec 2006
        • 700

        #4
        Originally posted by aradhanathawait
        Thanx a lot. If I am creating a database using "creatdb" command then where to specify character encoding? Please tell me.
        thanx & regards,
        Aradhana
        Code:
        createdb dbname -E encoding_you_want

        Comment

        • aradhanathawait
          New Member
          • Mar 2008
          • 36

          #5
          Originally posted by rski
          Code:
          createdb dbname -E encoding_you_want
          Thank you now the database is storing data in Unicode but while querying the field it shows Hexadecimal codes of the characters starting with &#. Can't we see Hindi characters in the database?

          Regards,
          Aradhana

          Comment

          Working...