Re: Unable to query with Chinese character
Posted by: Lamarche Lam
Date: January 08, 2021 03:37AM

Lamarche Lam Wrote:
-------------------------------------------------------
> Hello everyone,
> I'm new to MySQL so I was practicing with a MySQL
> tutorial
>
> There was a question in this tutorial requiring us
> to query a record using LIKE operator so I did it
> as:
>
> select
> Tname
> from Teacher
> where Tname like '李%';
>
> and the result was Tname: (nothing showed up
> except the column name).
> (All databases and tables in this tutorial was set
> to utf8 before any query was performed)
>
>
>
> Some suggested me to set the encoding in the
> configuration file (my.cnf) into utf8 and so I
> add:
>
> [client]
> default-character-set=utf8
>
> [mysql]
> default-character-set=utf8
>
> [mysqld]
> character-set-server=utf8
>
> in the my.cnf file and apply it in the system
> preference panel.
>
>
>
>
> However, it does't work at all.
> Could somebody please show me a way out of this?
> Thank you so much.


I'm using an Intel MacOS device with Big Sur(MacOS 11.1) installed

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Unable to query with Chinese character
414
January 08, 2021 03:37AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.