Professional Web Applications Themes

UK collation sequence - MySQL

I am working on a MySQL 5.0 database that automatically sets the default collation sequence to latin1_swedish_ci. It seems to be given some accented characters and messing up the UK currency symbol. The server is a shared hosting server and I don't think I can configure my own settings What is the default collation sequence should I use for trouble free UK oriented work when creating a table? Are there some additional settings I can use on the client side when connecting? I am using PHP, Microsoft Access and SQLYog clients....

  1. #1

    Default UK collation sequence


    I am working on a MySQL 5.0 database that automatically sets the
    default collation sequence to latin1_swedish_ci. It seems to be given
    some accented characters and messing up the UK currency symbol.

    The server is a shared hosting server and I don't think I can configure
    my own settings

    What is the default collation sequence should I use for trouble free UK
    oriented work when creating a table?

    Are there some additional settings I can use on the client side when
    connecting? I am using PHP, Microsoft Access and SQLYog clients.

    voipfc Guest

  2. #2

    Default Re: UK collation sequence


    voipfc wrote: 

    A collation sequence only effects collation, that is the order in which
    data is returned when an ORDER BY clause is included in the SELECT.

    Captain Guest

  3. #3

    Default Re: UK collation sequence


    voipfc 寫道:
     

    if you are not sure the servers' settings, you can execute the query:

    SET NAMES 'cht_name' COLLATE 'collation_name'
    http://dev.mysql.com/doc/refman/5.0/en/cht-connection.html

    which make sure you are working with the correct settings.

    howa Guest

  4. #4

    Default Re: UK collation sequence


    howa wrote: 
    >
    > if you are not sure the servers' settings, you can execute the query:
    >
    > SET NAMES 'cht_name' COLLATE 'collation_name'
    > http://dev.mysql.com/doc/refman/5.0/en/cht-connection.html
    >
    > which make sure you are working with the correct settings.[/ref]


    These are the values I obtain when I check the character set and
    collation sequences on the server.

    mysql> show variables like 'character_set%';
    +--------------------------+-----------------------------------------+
    | Variable_name | Value |
    +--------------------------+-----------------------------------------+
    | character_set_client | latin1 |
    | character_set_connection | latin1 |
    | character_set_database | latin1 |
    | character_set_results | latin1 |
    | character_set_server | latin1 |
    | character_set_system | utf8 |
    | character_sets_dir | /data/mysql/kyong/share/mysql/chts/ |
    +--------------------------+-----------------------------------------+
    7 rows in set (0.01 sec)

    mysql> show variables like 'collation%';
    +----------------------+-------------------+
    | Variable_name | Value |
    +----------------------+-------------------+
    | collation_connection | latin1_swedish_ci |
    | collation_database | latin1_swedish_ci |
    | collation_server | latin1_swedish_ci |
    +----------------------+-------------------+
    3 rows in set (0.02 sec)

    Is there any info here that can help me further with this issue?

    The collation sequence doesn't seem to be the issue, could the
    character set system being utf8 instead of latin1 be the cause of the
    problem?

    In the example set names command shown above would
    SET NAMES 'utf8' COLLATE 'latin_swedish_ci' be the answer?

    What is the basis of choosing between utf8, ascii and latin1 and what
    are the benefits in real world practice?

    voipfc Guest

  5. #5

    Default Re: UK collation sequence


    voipfc 寫道:

     


    it depends on your need, if you only need latin characters, there is no
    need to use utf8 as it is waste of storage

    howa Guest

  6. #6

    Default Re: UK collation sequence


    howa wrote: 
    >
    >
    > it depends on your need, if you only need latin characters, there is no
    > need to use utf8 as it is waste of storage[/ref]

    When I use SQLYog to export a database the UK £ signs are changed to
    A£. Prior to that I was getting ? characters in the export until I
    set the SET NAMES in the import file from utf8 to latin1.

    After exporting again the ? signs are gone but the A£ appears.

    Any idea what may be causing this?

    voipfc Guest

Similar Threads

  1. Dutch Letter-set/Collation ?
    By Ramon in forum MySQL
    Replies: 1
    Last Post: September 1st, 11:50 AM
  2. Collation sequence in query of query
    By tystadb in forum Coldfusion Database Access
    Replies: 1
    Last Post: December 12th, 10:21 PM

Bookmarks

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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139