1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to check the character set of an sql database

Discussion in 'Databases' started by Riversway, Apr 23, 2011.

  1. #1
    Could someone let me know how to check the character set of an sql database

    I have the database to upload to my hosting/ server.

    So need to know what it is before i upload

    Thanks for any answers. :)
     
    Riversway, Apr 23, 2011 IP
  2. Riversway

    Riversway Peon

    Messages:
    358
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It ok I've worked it out - you can open the file with notepad and it states the character set near the top of the file. :)
     
    Riversway, Apr 23, 2011 IP
  3. RamMurti

    RamMurti Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    or you can use SELECT DEFAULT_CHARACTER_SET_NAME FROM information_schema.SCHEMATA.
     
    RamMurti, Feb 2, 2012 IP
  4. ezprint2008

    ezprint2008 Well-Known Member

    Messages:
    611
    Likes Received:
    15
    Best Answers:
    2
    Trophy Points:
    140
    Digital Goods:
    1
    #4
    Is that for SQL output /download files? and you're referring to char-set for presentation? I'm assuming you know that regardless what chars it's in with database can be converted on pages through your basic CSS etc? If I'm understanding you right.
     
    ezprint2008, Feb 5, 2012 IP
  5. ivickon

    ivickon Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I'm writing code down side please check it how to use character set in My Sql
    For Schemas:

    SELECT default_character_set_name FROM information_schema.SCHEMATA S
    WHERE schema_name = "schemaname";
    For Tables:

    SELECT CCSA.character_set_name FROM information_schema.`TABLES` T,
    information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA
    WHERE CCSA.collation_name = T.table_collation
    AND T.table_schema = "schemaname"
    AND T.table_name = "tablename";
    For Columns:

    SELECT character_set_name FROM information_schema.`COLUMNS` C
    WHERE table_schema = "schemaname"
    AND table_name = "tablename"
    AND column_name = "columnname";
     
    ivickon, Feb 25, 2012 IP
  6. StormInternet

    StormInternet Peon

    Messages:
    46
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hi,

    If its a MySQL database then open your PHPMyadmin, click on "Character sets and Collations", it will list databases with their character sets and collation
     
    StormInternet, Feb 26, 2012 IP