mysql - How to make PHP use the right charset? -


I am creating a KSSN (Korean ID number) checker in PHP using a MySQL database. I check that it is working on an external site using the file_gate_content call.

The problem is that (with Hangul / Korean characters) the request is using the wrong charset when I echo the string, then the Korean characters are replaced with question marks only.

How can I use Korean? Should I change anything in the database? PRP source and SQL dump:

Note: I am using Apache (HTML), not CLI.

You need to do the following:

  1. Browser Tell us what encoding you want to get in the form submission, in the reply of aviv content type title or and lt; Meta & gt; by setting.

  2. Tell the database which encoding you are sending it bytes in the database.

Currently you are using the EUC-KR in the database, so it is possible that you want to use that encoding in both the above points. In this century, I recommend that UTF-8 is used for all web applications / databases, as is the East Asian multibyte encoding unchecked objection. (With potential security implications, if the mysql_real_escape_string does not know the correct encoding, in which the ' or \ containing a multibyte sequence can be hidden through SQL However, if enpang.com is using EUC-KR, then the need to transcode or transcode with the UUCRR for the name URL parameter. The name value of the EUC-KR will be UTF-8 for that purpose by using iconv () (It is not clear to me that encoding enpang.com is using the URL parameters to check their names for service; I always get the same result.)


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -