Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Aug 2004
    Location
    LA
    Posts
    1

    Japanese Character with mySQL

    Is someone know Hosting Co. which can use Japanese Character with mySQL?(Compiled with Japanese)

    I can use mySQL without Japanese compiled but search functions does not work correctly...

  2. #2
    Junior Member
    Join Date
    Feb 2020
    Posts
    7
    Are you using utf8 encoding? In order for your search to work properly, you need to:

    1. Use utf8 encoding when creating a database
    2. Make sure all text fields (varchar and text) are using UTF-8
    3. When you make a connection do this before you query/update the database:
    SET NAMES utf8;
    4. With phpMyAdmin - Choose UTF-8 when you login
    5. Set web page encoding to utf-8 to make sure all post/get data will be in UTF-8, PHP code (first line in the php file or at least before any output):
    header('Content-Type: text/html; charset=UTF-8');
    6. Make sure all your queries are written in UTF8 encoding. If using PHP:
    6.1. If PHP supports code in UTF-8 - just write your files in UTF-8.
    6.2. If php is compiled without UTF-8 support - convert your strings to UTF-8 like this:
    $str = mb_convert_encoding($str, 'UTF-8', '<put your file encoding here');
    $query = 'SELECT * FROM test WHERE name = "' . $str . '"';

    This is a great guide from a stackoverflow post, you should check it out here and look at other answers if this one doesnt help you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

  Find Web Hosting      
  Shared Web Hosting UNIX & Linux Web Hosting Windows Web Hosting Adult Web Hosting
  ASP ASP.NET Web Hosting Reseller Web Hosting VPS Web Hosting Managed Web Hosting
  Cloud Web Hosting Dedicated Server E-commerce Web Hosting Cheap Web Hosting


Premium Partners:


Visit forums.thewebhostbiz.com: to discuss the web hosting business, buy and sell websites and domain names, and discuss current web hosting tools and software.