Re: SELECT w/LIKE on Swedish character ö finds ], why?

2002-03-28 Thread Ken Menzel

Hi Makis,
default-character-set  = greek

Try that, best wishes,
Ken

P.S.  also for anyone else asking here are all the charsets included
in MySQL by default.  You can also create your own.

mysql> show variables like "char%";
++
--
-+
| Variable_name  | Value
|
++
--
-+
| character_set  | latin1
|
| character_sets | latin1 dec8 dos german1 hp8 koi8_ru latin2 swe7
usa7 cp1251 danish hebrew win1251 estonia hungarian koi8_ukr
win1251ukr greek win1250 croat cp1257 latin5 |
++
--
-+
2 rows in set (0.00 sec)



- Original Message -
From: "savaidis" <[EMAIL PROTECTED]>
To: "Ken Menzel" <[EMAIL PROTECTED]>; "Philip Semanchuk"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, March 28, 2002 12:40 PM
Subject: RE: SELECT w/LIKE on Swedish character ö finds ], why?


> Is there something similar for Greeks too?
> (not that matters very much as I run on internet host but in case..)
>
>
> Makis
>
>
> > -Original Message-
> > From: Ken Menzel [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, March 26, 2002 10:25 PM
> > To: Philip Semanchuk
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: SELECT w/LIKE on Swedish character ö finds ], why?
> >
> >
> > Hi Philip,
> >   before running your test next time try this:
> >
> > vi /etc/my.cnf
> >
> > insert into this file:
> >
> > [mysqld]
> > default-character-set  = swe7
> >
> > then stop mysql (mysqladmin shutdown)
> >
> > and restart (safe_mysqld&)
> >
> > then try your test again.  It worked fine for me.
> >
> > Ken
> >
> >
> > > Philip Semanchuk wrote:
> > > >
> > > > Hi everyone,
> > > > I am having a little trouble with searching for Swedish
> > characters. When I
> > > > SELECT using LIKE I get matches that I do not expect. I have
> > created a
> > > > simple test case that is entirely reproduced below. To
summarize,
> > I insert
> > > > one row into a single-column table that contains the right
square
> > bracket
> > > > character (ASCII 0x5d). When I search for the Swedish letter ö
> > (ISO-8859-1
> > > > 0xf6) I find the row containing the right bracket.
> > > >
> > > > We're running RedHat 7.2 with nothing fancy added in as we're
> > Linux novices
> > > > and just playing around with the system to see how it works.
> > MySQL -V
> > > > produces this:
> > > > mysql  Ver 11.15 Distrib 3.23.41, for redhat-linux-gnu (i386)
> > > >
> > > > Here's my test:
> > > >
> > > > mysql> create database swedish_character_test;
> > > > Query OK, 1 row affected (0.00 sec)
> > > >
> > > > mysql> use swedish_character_test;
> > > > Database changed
> > > > mysql> create table simple (name varchar(255) NOT NULL);
> > > > Query OK, 0 rows affected (0.00 sec)
> > > >
> > > > mysql> insert into simple (name) values (']');
> > > > Query OK, 1 row affected (0.00 sec)
> > > >
> > > > mysql> select name from simple where name like '%ö%';
> > > > +--+
> > > > | name |
> > > > +--+
> > > > | ]|
> > > > +--+
> > > > 1 row in set (0.00 sec)
> > > >
> > > > I'd appreciate any help understanding why ö = ] in this case.
> >
> >
> >
>
> 
-
> > Before posting, please check:
> >http://www.mysql.com/manual.php   (the manual)
> >http://lists.mysql.com/   (the list archive)
> >
> > To request this thread, e-mail
<[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try:
http://lists.mysql.com/php/unsubscribe.php
> >
>
>
> 
-
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try:
http://lists.mysql.com/php/unsubscribe.php
>
>


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: SELECT w/LIKE on Swedish character ö finds ], why?

2002-03-28 Thread savaidis

Is there something similar for Greeks too?
(not that matters very much as I run on internet host but in case..)


Makis


> -Original Message-
> From: Ken Menzel [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 26, 2002 10:25 PM
> To: Philip Semanchuk
> Cc: [EMAIL PROTECTED]
> Subject: Re: SELECT w/LIKE on Swedish character ö finds ], why?
>
>
> Hi Philip,
>   before running your test next time try this:
>
> vi /etc/my.cnf
>
> insert into this file:
>
> [mysqld]
> default-character-set  = swe7
>
> then stop mysql (mysqladmin shutdown)
>
> and restart (safe_mysqld&)
>
> then try your test again.  It worked fine for me.
>
> Ken
>
>
> > Philip Semanchuk wrote:
> > >
> > > Hi everyone,
> > > I am having a little trouble with searching for Swedish
> characters. When I
> > > SELECT using LIKE I get matches that I do not expect. I have
> created a
> > > simple test case that is entirely reproduced below. To summarize,
> I insert
> > > one row into a single-column table that contains the right square
> bracket
> > > character (ASCII 0x5d). When I search for the Swedish letter ö
> (ISO-8859-1
> > > 0xf6) I find the row containing the right bracket.
> > >
> > > We're running RedHat 7.2 with nothing fancy added in as we're
> Linux novices
> > > and just playing around with the system to see how it works.
> MySQL -V
> > > produces this:
> > > mysql  Ver 11.15 Distrib 3.23.41, for redhat-linux-gnu (i386)
> > >
> > > Here's my test:
> > >
> > > mysql> create database swedish_character_test;
> > > Query OK, 1 row affected (0.00 sec)
> > >
> > > mysql> use swedish_character_test;
> > > Database changed
> > > mysql> create table simple (name varchar(255) NOT NULL);
> > > Query OK, 0 rows affected (0.00 sec)
> > >
> > > mysql> insert into simple (name) values (']');
> > > Query OK, 1 row affected (0.00 sec)
> > >
> > > mysql> select name from simple where name like '%ö%';
> > > +--+
> > > | name |
> > > +--+
> > > | ]|
> > > +--+
> > > 1 row in set (0.00 sec)
> > >
> > > I'd appreciate any help understanding why ö = ] in this case.
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: SELECT w/LIKE on Swedish character ö finds ], why?

2002-03-27 Thread Philip Semanchuk

Ken,
That worked! THanks very much.

> -Original Message-
> From: Ken Menzel [mailto:[EMAIL PROTECTED]]
> Sent: den 26 mars 2002 21:25
> To: Philip Semanchuk
> Cc: [EMAIL PROTECTED]
> Subject: Re: SELECT w/LIKE on Swedish character ö finds ], why?
> 
> 
> Hi Philip,
>   before running your test next time try this:
> 
> vi /etc/my.cnf
> 
> insert into this file:
> 
> [mysqld]
> default-character-set  = swe7
> 
> then stop mysql (mysqladmin shutdown)
> 
> and restart (safe_mysqld&)
> 
> then try your test again.  It worked fine for me.
> 
> Ken
> 
> 
> > Philip Semanchuk wrote:
> > >
> > > Hi everyone,
> > > I am having a little trouble with searching for Swedish
> characters. When I
> > > SELECT using LIKE I get matches that I do not expect. I have
> created a
> > > simple test case that is entirely reproduced below. To summarize,
> I insert
> > > one row into a single-column table that contains the right square
> bracket
> > > character (ASCII 0x5d). When I search for the Swedish letter ö
> (ISO-8859-1
> > > 0xf6) I find the row containing the right bracket.
> > >
> > > We're running RedHat 7.2 with nothing fancy added in as we're
> Linux novices
> > > and just playing around with the system to see how it works.
> MySQL -V
> > > produces this:
> > > mysql  Ver 11.15 Distrib 3.23.41, for redhat-linux-gnu (i386)
> > >
> > > Here's my test:
> > >
> > > mysql> create database swedish_character_test;
> > > Query OK, 1 row affected (0.00 sec)
> > >
> > > mysql> use swedish_character_test;
> > > Database changed
> > > mysql> create table simple (name varchar(255) NOT NULL);
> > > Query OK, 0 rows affected (0.00 sec)
> > >
> > > mysql> insert into simple (name) values (']');
> > > Query OK, 1 row affected (0.00 sec)
> > >
> > > mysql> select name from simple where name like '%ö%';
> > > +--+
> > > | name |
> > > +--+
> > > | ]|
> > > +--+
> > > 1 row in set (0.00 sec)
> > >
> > > I'd appreciate any help understanding why ö = ] in this case.
> 
> 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: SELECT w/LIKE on Swedish character ö finds ], why?

2002-03-26 Thread Ken Menzel

Hi Philip,
  before running your test next time try this:

vi /etc/my.cnf

insert into this file:

[mysqld]
default-character-set  = swe7

then stop mysql (mysqladmin shutdown)

and restart (safe_mysqld&)

then try your test again.  It worked fine for me.

Ken


> Philip Semanchuk wrote:
> >
> > Hi everyone,
> > I am having a little trouble with searching for Swedish
characters. When I
> > SELECT using LIKE I get matches that I do not expect. I have
created a
> > simple test case that is entirely reproduced below. To summarize,
I insert
> > one row into a single-column table that contains the right square
bracket
> > character (ASCII 0x5d). When I search for the Swedish letter ö
(ISO-8859-1
> > 0xf6) I find the row containing the right bracket.
> >
> > We're running RedHat 7.2 with nothing fancy added in as we're
Linux novices
> > and just playing around with the system to see how it works.
MySQL -V
> > produces this:
> > mysql  Ver 11.15 Distrib 3.23.41, for redhat-linux-gnu (i386)
> >
> > Here's my test:
> >
> > mysql> create database swedish_character_test;
> > Query OK, 1 row affected (0.00 sec)
> >
> > mysql> use swedish_character_test;
> > Database changed
> > mysql> create table simple (name varchar(255) NOT NULL);
> > Query OK, 0 rows affected (0.00 sec)
> >
> > mysql> insert into simple (name) values (']');
> > Query OK, 1 row affected (0.00 sec)
> >
> > mysql> select name from simple where name like '%ö%';
> > +--+
> > | name |
> > +--+
> > | ]|
> > +--+
> > 1 row in set (0.00 sec)
> >
> > I'd appreciate any help understanding why ö = ] in this case.



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: SELECT w/LIKE on Swedish character ö finds ], why?

2002-03-26 Thread Philip Semanchuk

> If I were to take a wild guess I would say that the lower 7 bits of ö
> and ] match.  Which would mean that this isn't really text, ie 7-bit
> ASCII, but really BINARY data.  Which means either you need "create
> table simple (name varchar(255) BINARY NOT NULL);" or "create table
> simple (name tinyblob NOT NULL);"

Jim,
Thanks for the suggestion, but I already checked that and got no joy -- 

ö = 0xf6 = 0110
] = 0x5d = 01011101

Philip

> -Original Message-
> From: James Housley [mailto:[EMAIL PROTECTED]]
> Sent: den 26 mars 2002 18:06
> To: Philip Semanchuk
> Cc: '[EMAIL PROTECTED]'
> Subject: Re: SELECT w/LIKE on Swedish character ö finds ], why?
> 
> 
> Philip Semanchuk wrote:
> > 
> > Hi everyone,
> > I am having a little trouble with searching for Swedish 
> characters. When I
> > SELECT using LIKE I get matches that I do not expect. I 
> have created a
> > simple test case that is entirely reproduced below. To 
> summarize, I insert
> > one row into a single-column table that contains the right 
> square bracket
> > character (ASCII 0x5d). When I search for the Swedish 
> letter ö (ISO-8859-1
> > 0xf6) I find the row containing the right bracket.
> > 
> > We're running RedHat 7.2 with nothing fancy added in as 
> we're Linux novices
> > and just playing around with the system to see how it 
> works. MySQL -V
> > produces this:
> > mysql  Ver 11.15 Distrib 3.23.41, for redhat-linux-gnu (i386)
> > 
> > Here's my test:
> > 
> > mysql> create database swedish_character_test;
> > Query OK, 1 row affected (0.00 sec)
> > 
> > mysql> use swedish_character_test;
> > Database changed
> > mysql> create table simple (name varchar(255) NOT NULL);
> > Query OK, 0 rows affected (0.00 sec)
> > 
> > mysql> insert into simple (name) values (']');
> > Query OK, 1 row affected (0.00 sec)
> > 
> > mysql> select name from simple where name like '%ö%';
> > +--+
> > | name |
> > +--+
> > | ]|
> > +--+
> > 1 row in set (0.00 sec)
> > 
> > I'd appreciate any help understanding why ö = ] in this case.
> > 
> 
> If I were to take a wild guess I would say that the lower 7 bits of ö
> and ] match.  Which would mean that this isn't really text, ie 7-bit
> ASCII, but really BINARY data.  Which means either you need "create
> table simple (name varchar(255) BINARY NOT NULL);" or "create table
> simple (name tinyblob NOT NULL);"
> 
> Give thoses a try.
> 
> Jim
> -- 
> /"\   ASCII Ribbon Campaign  .
> \ / - NO HTML/RTF in e-mail  .
>  X  - NO Word docs in e-mail .
> / \ -
> [EMAIL PROTECTED]  http://www.FreeBSD.org The Power to Serve
> [EMAIL PROTECTED]  http://www.TheHousleys.net
> [EMAIL PROTECTED]  http://www.SimTel.Net
> -
> Progress (n) : What led from smart users in front of dumb terminals to
> dumb users in front of smart terminals.
> 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: SELECT w/LIKE on Swedish character ö finds ], why?

2002-03-26 Thread Philip Semanchuk

THanks Makis, is this bug documented anywhere?

> -Original Message-
> From: savaidis [mailto:[EMAIL PROTECTED]]
> Sent: den 26 mars 2002 18:04
> To: Philip Semanchuk; [EMAIL PROTECTED]
> Subject: RE: SELECT w/LIKE on Swedish character ö finds ], why?
> 
> 
> I have the same problem with Greeks, it is a bug of MySQL.
> Try:
> 1) Create the fields of the table with BINARY option.
> 2) Use LIKE with BINARY option (slower)
> BINARY doesn't make the uppercase convertion.
> 
> Makis
> 
> 
> > -Original Message-


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: SELECT w/LIKE on Swedish character ö finds ], why?

2002-03-26 Thread James Housley

Philip Semanchuk wrote:
> 
> Hi everyone,
> I am having a little trouble with searching for Swedish characters. When I
> SELECT using LIKE I get matches that I do not expect. I have created a
> simple test case that is entirely reproduced below. To summarize, I insert
> one row into a single-column table that contains the right square bracket
> character (ASCII 0x5d). When I search for the Swedish letter ö (ISO-8859-1
> 0xf6) I find the row containing the right bracket.
> 
> We're running RedHat 7.2 with nothing fancy added in as we're Linux novices
> and just playing around with the system to see how it works. MySQL -V
> produces this:
> mysql  Ver 11.15 Distrib 3.23.41, for redhat-linux-gnu (i386)
> 
> Here's my test:
> 
> mysql> create database swedish_character_test;
> Query OK, 1 row affected (0.00 sec)
> 
> mysql> use swedish_character_test;
> Database changed
> mysql> create table simple (name varchar(255) NOT NULL);
> Query OK, 0 rows affected (0.00 sec)
> 
> mysql> insert into simple (name) values (']');
> Query OK, 1 row affected (0.00 sec)
> 
> mysql> select name from simple where name like '%ö%';
> +--+
> | name |
> +--+
> | ]|
> +--+
> 1 row in set (0.00 sec)
> 
> I'd appreciate any help understanding why ö = ] in this case.
> 

If I were to take a wild guess I would say that the lower 7 bits of ö
and ] match.  Which would mean that this isn't really text, ie 7-bit
ASCII, but really BINARY data.  Which means either you need "create
table simple (name varchar(255) BINARY NOT NULL);" or "create table
simple (name tinyblob NOT NULL);"

Give thoses a try.

Jim
-- 
/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
 X  - NO Word docs in e-mail .
/ \ -
[EMAIL PROTECTED]  http://www.FreeBSD.org The Power to Serve
[EMAIL PROTECTED]  http://www.TheHousleys.net
[EMAIL PROTECTED]  http://www.SimTel.Net
-
Progress (n) : What led from smart users in front of dumb terminals to
dumb users in front of smart terminals.

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: SELECT w/LIKE on Swedish character ö finds ], why?

2002-03-26 Thread savaidis

I have the same problem with Greeks, it is a bug of MySQL.
Try:
1) Create the fields of the table with BINARY option.
2) Use LIKE with BINARY option (slower)
BINARY doesn't make the uppercase convertion.

Makis


> -Original Message-
> From: Philip Semanchuk [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 26, 2002 6:45 PM
> To: '[EMAIL PROTECTED]'
> Subject: SELECT w/LIKE on Swedish character ö finds ], why?
>
>
> Hi everyone,
> I am having a little trouble with searching for Swedish characters. When I
> SELECT using LIKE I get matches that I do not expect. I have created a
> simple test case that is entirely reproduced below. To summarize, I insert
> one row into a single-column table that contains the right square bracket
> character (ASCII 0x5d). When I search for the Swedish letter ö (ISO-8859-1
> 0xf6) I find the row containing the right bracket.
>
> We're running RedHat 7.2 with nothing fancy added in as we're
> Linux novices
> and just playing around with the system to see how it works. MySQL -V
> produces this:
> mysql  Ver 11.15 Distrib 3.23.41, for redhat-linux-gnu (i386)
>
> Here's my test:
>
> mysql> create database swedish_character_test;
> Query OK, 1 row affected (0.00 sec)
>
> mysql> use swedish_character_test;
> Database changed
> mysql> create table simple (name varchar(255) NOT NULL);
> Query OK, 0 rows affected (0.00 sec)
>
> mysql> insert into simple (name) values (']');
> Query OK, 1 row affected (0.00 sec)
>
> mysql> select name from simple where name like '%ö%';
> +--+
> | name |
> +--+
> | ]|
> +--+
> 1 row in set (0.00 sec)
>
>
> I'd appreciate any help understanding why ö = ] in this case.
>
> Thanks in advance,
> Philip
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




SELECT w/LIKE on Swedish character ö finds ], why?

2002-03-26 Thread Philip Semanchuk

Hi everyone,
I am having a little trouble with searching for Swedish characters. When I
SELECT using LIKE I get matches that I do not expect. I have created a
simple test case that is entirely reproduced below. To summarize, I insert
one row into a single-column table that contains the right square bracket
character (ASCII 0x5d). When I search for the Swedish letter ö (ISO-8859-1
0xf6) I find the row containing the right bracket.

We're running RedHat 7.2 with nothing fancy added in as we're Linux novices
and just playing around with the system to see how it works. MySQL -V
produces this:
mysql  Ver 11.15 Distrib 3.23.41, for redhat-linux-gnu (i386)

Here's my test:

mysql> create database swedish_character_test;
Query OK, 1 row affected (0.00 sec)

mysql> use swedish_character_test;
Database changed
mysql> create table simple (name varchar(255) NOT NULL);
Query OK, 0 rows affected (0.00 sec)

mysql> insert into simple (name) values (']');
Query OK, 1 row affected (0.00 sec)

mysql> select name from simple where name like '%ö%';
+--+
| name |
+--+
| ]|
+--+
1 row in set (0.00 sec)


I'd appreciate any help understanding why ö = ] in this case.

Thanks in advance,
Philip

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php