Re: latin1/utf-8 problem

2004-11-29 Thread Gleb Paharenko
Hello.



Looks like you've solved the problem? Remove quotes from show create...

statements:

  show create table table_name;





Steve Mansfield <[EMAIL PROTECTED]> wrote:

> ---

> On Saturday 27 November 2004 12:38, Steve Mansfield wrote:

> 

> Seem to be answering my own questions here...:-)

> 

> Looks like it's a MySQLcc problem.

> 

> Dumped tables from the live server and then, rather than running them as a 
> sql 

> query via MySQLcc, I did it from the command line with:

> 

> mysql -h host -D database -p < filename.sql

> 

> And that worked. The data stayed as latin1. For some reason, MySQLcc is 

> messing with the data and turning it into utf-8. Go figure...

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: latin1/utf-8 problem

2004-11-28 Thread Steve Mansfield
---
On Saturday 27 November 2004 12:52, Gleb Paharenko wrote:
| Hello.
|
| Strange behavior. You said that both servers configured to use latin1?
| What output produced

Can only do with for the local server, access is denied to the mysql shell on 
the shared hosting. But it's the local system that's causing the unexpected 
effects:

|   show variables like '%char%';

character_set   latin1
character_sets   latin1 big5 [...bunch of others including latin5 - no utf-8 
to be seen anywhere...]
convert_character_set

|   show variables like '%colla%';

empty set

|   show create database 'database_name';

ERROR 1064: [sql syntax error]

|   show create table 'table_name';

ERROR 1064: [sql syntax error]

| on both servers? Also send your my.cnf files.

[client]
port= 3306
socket  = /var/lib/mysql/mysql.sock
default-character-set = latin1

[mysqld]
port= 3306
socket  = /var/lib/mysql/mysql.sock
datadir = /share/mysql/data
skip-locking
set-variable= key_buffer=16M
set-variable= max_allowed_packet=1M
set-variable= table_cache=64
set-variable= sort_buffer=512K
set-variable= net_buffer_length=8K
set-variable= myisam_sort_buffer_size=8M
log-bin
server-id   = 1

[safe_mysqld]
err-log=/var/lib/mysql/mysqld.log

[mysqldump]
quick
set-variable= max_allowed_packet=16M

[mysql]
no-auto-rehash

[isamchk]
set-variable= key_buffer=20M
set-variable= sort_buffer=20M
set-variable= read_buffer=2M
set-variable= write_buffer=2M

[myisamchk]
set-variable= key_buffer=20M
set-variable= sort_buffer=20M
set-variable= read_buffer=2M
set-variable= write_buffer=2M

[mysqlhotcopy]
interactive-timeout

-- 
@+
Steve

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: latin1/utf-8 problem

2004-11-28 Thread Gleb Paharenko
Hello.



Strange behavior. You said that both servers configured to use latin1?

What output produced 

  show variables like '%char%';

  show variables like '%colla%';

  show create database 'database_name';

  show create table 'table_name';

on both servers? Also send your my.cnf files.





Steve Mansfield <[EMAIL PROTECTED]> wrote:

> ---

> On Saturday 27 November 2004 12:16, Steve Mansfield wrote:

> | ---

> |

> | On Friday 26 November 2004 17:58, Gleb Paharenko wrote:

> | | Hello.

> | |

> | | What charset produced mysqldump with --default-character-set=latin1

> | | command line option?

> |

> | Hmm, that still produced a file with utf-8 characters, which means they

> | must be stored that way in the table, no? (Although MySQLcc sees them



> | correctly).

> |

> | (BTW, I've configured Kwrite, the editor I'm using, to open/save as

> | iso-8859-1).

> 

> Just to provide a bit more info - and to double-check - I exported the table 

> from the live system (via phpMyAdmin) and looked at it on my local system and 

> it was in latin1. I dropped the table from the live system, then uploaded the 

> copy of the table that I'd dumped from my local system using the 

> --default-character-set=latin1 option. On the live system, this now has utf-8 

> characters (so it's nothing to do with my editor...).

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: latin1/utf-8 problem

2004-11-27 Thread Steve Mansfield
---
On Saturday 27 November 2004 12:38, Steve Mansfield wrote:

Seem to be answering my own questions here...:-)

Looks like it's a MySQLcc problem.

Dumped tables from the live server and then, rather than running them as a sql 
query via MySQLcc, I did it from the command line with:

mysql -h host -D database -p < filename.sql

And that worked. The data stayed as latin1. For some reason, MySQLcc is 
messing with the data and turning it into utf-8. Go figure...

-- 
@+
Steve

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: latin1/utf-8 problem

2004-11-27 Thread Steve Mansfield
---
On Saturday 27 November 2004 12:16, Steve Mansfield wrote:
| ---
|
| On Friday 26 November 2004 17:58, Gleb Paharenko wrote:
| | Hello.
| |
| | What charset produced mysqldump with --default-character-set=latin1
| | command line option?
|
| Hmm, that still produced a file with utf-8 characters, which means they
| must be stored that way in the table, no? (Although MySQLcc sees them
| correctly).
|
| (BTW, I've configured Kwrite, the editor I'm using, to open/save as
| iso-8859-1).

Just to provide a bit more info - and to double-check - I exported the table 
from the live system (via phpMyAdmin) and looked at it on my local system and 
it was in latin1. I dropped the table from the live system, then uploaded the 
copy of the table that I'd dumped from my local system using the 
--default-character-set=latin1 option. On the live system, this now has utf-8 
characters (so it's nothing to do with my editor...).

-- 
@+
Steve

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: latin1/utf-8 problem

2004-11-27 Thread Steve Mansfield
---
On Friday 26 November 2004 17:58, Gleb Paharenko wrote:
| Hello.
|
| What charset produced mysqldump with --default-character-set=latin1 command
| line option?

Hmm, that still produced a file with utf-8 characters, which means they must 
be stored that way in the table, no? (Although MySQLcc sees them correctly).

(BTW, I've configured Kwrite, the editor I'm using, to open/save as 
iso-8859-1).

@+
Steve

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: latin1/utf-8 problem

2004-11-27 Thread Gleb Paharenko
Hello.



What charset produced mysqldump with --default-character-set=latin1 command

line option?







Steve Mansfield <[EMAIL PROTECTED]> wrote:

> I have a strange, irritating problem that I think is to do with MySQL. I have 

> a table on a live (shared hosting) system that, when I use it on my local 

> system, seems to wind up in utf-8 rather than latin1. Here's the set-up:

> 

> Live system - MySQL 3.2.3.56, PHP 4.1.2, Apache 1.3.27. MySQL is configured 
> to 

> use latin1, PHP to no default charset.

> 

> Local system - MySQL 4.0.18-32, PHP 4.3.4, Apache2 (all from SuSE 9.1 
> distro). 

> MySQL is configured to use latin1, PHP to no default charset.

> 

> I have a table containing text with French accented characters. On the live 

> system, these display correctly when viewed with a browser set to iso-8859-1 

> encoding (which is what the page specifies). On the local system, the page 

> has to be viewed as utf-8. Huh?

> 

> This is the same data. I dumped the table from the live system (via 
> phpMyAdmin 

> - also set to use latin1) to my local disk. I viewed that with Kwrite which 

> showed me that the text was, indeed, latin1 in that file. I uploaded the 

> table to the local system. In MySQLcc (set to latin1) the text reads 

> correctly. Running myisamchk on the table tells me it's latin1. And yet, if I 

> mysqldump the table, the resulting file appears to be utf-8! And data pulled 

> from the table by PHP also appears to be utf-8.

> 

> Help!

> 

> @+

> Steve

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



latin1/utf-8 problem

2004-11-26 Thread Steve Mansfield
I have a strange, irritating problem that I think is to do with MySQL. I have 
a table on a live (shared hosting) system that, when I use it on my local 
system, seems to wind up in utf-8 rather than latin1. Here's the set-up:

Live system - MySQL 3.2.3.56, PHP 4.1.2, Apache 1.3.27. MySQL is configured to 
use latin1, PHP to no default charset.

Local system - MySQL 4.0.18-32, PHP 4.3.4, Apache2 (all from SuSE 9.1 distro). 
MySQL is configured to use latin1, PHP to no default charset.

I have a table containing text with French accented characters. On the live 
system, these display correctly when viewed with a browser set to iso-8859-1 
encoding (which is what the page specifies). On the local system, the page 
has to be viewed as utf-8. Huh?

This is the same data. I dumped the table from the live system (via phpMyAdmin 
- also set to use latin1) to my local disk. I viewed that with Kwrite which 
showed me that the text was, indeed, latin1 in that file. I uploaded the 
table to the local system. In MySQLcc (set to latin1) the text reads 
correctly. Running myisamchk on the table tells me it's latin1. And yet, if I 
mysqldump the table, the resulting file appears to be utf-8! And data pulled 
from the table by PHP also appears to be utf-8.

Help!

@+
Steve

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



UTF-8 problem

2004-05-24 Thread Marek Lewczuk
Hello,
I've just installed 4.1.1 to see how UTF-8 is working. In my.ini I have 
set default-character-set=utf8 - so all input/output data should be send 
in utf-8 charset. System variables (after start) are set as they should:

character_set_serverutf8
character_set_systemutf8
character_set_database  utf8
character_set_clientutf8
character_set_connectionutf8
character_set_results   utf8
collation_connectionutf8_general_ci
collation_database  utf8_general_ci
collation_serverutf8_general_ci
And now, php function mysqli_character_set_name return latin1_swedish_ci 
and all queries are returned in this character-set. Queries are working 
only when I set connection character-set:
mysqli_query($c, "SET CHARACTER SET utf8;");
mysqli_query($c, "SELECT * FROM db");

What I should change to have all in/out queries executed in utf8 and 
utf8_general_ci collation.

Thanks in advance.
ML


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


ORDER BY ascii value (another UTF-8 problem...)

2003-11-28 Thread Yves Goergen
Hi again,

I have stored UTF-8 encoded usernames in a table and need a properly sorted
output. I tried with 'ORDER BY Name', but it won't sort extended ASCII
characters correctly by their values but rather by some similarity with
other letters. In my example, the Unicode character starts with a value,
that looks like an 'A' with some kind of accent on it. So it gets sorted at
the end of A's. But I don't want this and have it sorted at the very end of
the list. I believe, also the BETWEEN operator is concerned by this.
I know that 'real' accented letters are sorted at the end, too, by this way,
but this seems still a little more logical than having any non-letter
characters displayed in between of letters.

So is there any possiblity to switch ORDER BY sorting character set to use
no intelligence and only sort strings by their ASCII value? I haven't found
some suitable way in the documentation. Ah, btw, I can't do any changes at
the server itself. It must be solved by a query or a query parameter or
something like this.

The best solution would be to apply UTF-8 sorting order (now with accented
letters intelligence, again) on the names, but MySQL 4.0.16 doesn't really
have UTF-8 support, does it? And it will still take a while until until 4.1
will be production release...

-- 
Yves Goergen
[EMAIL PROTECTED]
Please don't CC me (causes double mails)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]