Results 1 to 7 of 7

Thread: How to set default charset?
      
   

  1. #1
    Artik is offline Private
    Join Date
    Oct 2006
    Posts
    3

    Default How to set default charset?

    Hello!
    Please, help me to set default charset to cp1251 (or windows 1251) to MySQL db. I need to upload texts in Russian, but all characters turn into "?" because the current setting is UTF8.
    Tnanks,
    Artik
    nova-consulting.org

  2. #2
    bill2006's Avatar
    bill2006 is offline Lieutenant General
    Join Date
    May 2006
    Posts
    3,422

    Default Re: How to set default charset?

    Go to this post by Brad.

  3. #3
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: How to set default charset?

    ????

    to change the default chr set in MySQL you need to act on the collation of the fields
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  4. #4
    Artik is offline Private
    Join Date
    Oct 2006
    Posts
    3

    Default Re: How to set default charset?

    Can't understand. What exactly should I do? Is it possible to set default chr set in MySQL from the cPanel? I looked for the my.cn file from the File Manager but could not find it. How else can I change settings?

    Artik

  5. #5
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: How to set default charset?

    These are the default character sets for the databases on VH servers:
    latin1 big5 czech euc_kr gb2312 gbk latin1_de sjis tis620 ujis dec8 dos german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew win1251 estonia hungarian koi8_ukr win1251ukr greek win1250 croat cp1257 latin5

    If you need to add some chr set, go in your CP, Click on the MySQL section, select your specific DB, then run a querry according to the instruction that you find in

    10.3.1. Server Character Set and Collation
    10.3.2. Database Character Set and Collation
    10.3.3. Table Character Set and Collation
    10.3.4. Column Character Set and Collation
    10.3.5. Character String Literal Character Set and Collation
    10.3.6. National Character Set
    10.3.7. Examples of Character Set and Collation Assignment
    10.3.8. Compatibility with Other DBMSs

    More specific:
    10.10. Character Sets and Collations That MySQL Supports
    10.10.1. Unicode Character Sets
    10.10.2. West European Character Sets
    10.10.3. Central European Character Sets
    10.10.4. South European and Middle East Character Sets
    10.10.5. ****** Character Sets 10.10.6. Cyrillic Character Sets
    10.10.7. Asian Character Sets
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  6. #6
    jjj0923 is offline Private
    Join Date
    Mar 2007
    Posts
    1

    Default Re: How to set default charset?

    Quote Originally Posted by navaldesign
    These are the default character sets for the databases on VH servers:
    latin1 big5 czech euc_kr gb2312 gbk latin1_de sjis tis620 ujis dec8 dos german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew win1251 estonia hungarian koi8_ukr win1251ukr greek win1250 croat cp1257 latin5

    If you need to add some chr set, go in your CP, Click on the MySQL section, select your specific DB, then run a querry according to the instruction that you find in

    10.3.1. Server Character Set and Collation
    10.3.2. Database Character Set and Collation
    10.3.3. Table Character Set and Collation
    10.3.4. Column Character Set and Collation
    10.3.5. Character String Literal Character Set and Collation
    10.3.6. National Character Set
    10.3.7. Examples of Character Set and Collation Assignment
    10.3.8. Compatibility with Other DBMSs

    More specific:
    10.10. Character Sets and Collations That MySQL Supports
    10.10.1. Unicode Character Sets
    10.10.2. West European Character Sets
    10.10.3. Central European Character Sets
    10.10.4. South European and Middle East Character Sets
    10.10.5. ****** Character Sets 10.10.6. Cyrillic Character Sets
    10.10.7. Asian Character Sets
    I have a website I need to move that has both asp and php pages. the mysqk database in use on the site has a character set of latin1

    I have checked with 3 different web hosting companies and none of them support latin1 - phpmyadmin gives ans error message when trying to execute this sql:

    CREATE TABLE `access` (
    `userid` int(10) unsigned NOT NULL default '0',
    `forumid` smallint(5) unsigned NOT NULL default '0',
    `accessmask` smallint(5) unsigned NOT NULL default '0',
    PRIMARY KEY (`userid`,`forumid`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

    #
    # Dumping data for table `access`
    #

    INSERT INTO `access` VALUES (321, 3, 1);
    INSERT INTO `access` VALUES (321, 4, 1);
    INSERT INTO `access` VALUES (321, 5, 1);
    INSERT INTO `access` VALUES (321, 6, 1);
    INSERT INTO `access` VALUES (321, 7, 1);

    can your servers handle this?
    can you support both php and asp pages on the same website?

    thanks

  7. #7
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: How to set default charset?

    Sorry, no asp. We have Linux servers, so no ASP pages are supported.

    Our MySQL databases can be setup to have Latin1 collation directly from phpMyAdmin.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49