1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Hebrew Characters Not Showing In Php Through MySql

Discussion in 'Software Development' started by HowdeeDoodee, Jun 27, 2008.

Thread Status:
Not open for further replies.
  1. HowdeeDoodee

    HowdeeDoodee Thread Starter

    Aug 26, 2004
    I am trying to display Hebrew characters in php through mysql.
    I have tried changing the collation settings in phpMyAdmin.
    I tried utf8_bin and utf8_unicode. In both of these attempts the Hebrew characters would not show in phpMyAdmin.
    Of course, no luck either when trying to display the characters through php.

    I changed to utf8_general_ci:
    Now the Hebrew does show in the insert paste in window
    The Hebrew does show in Sql query report window as is shown below.

    When I call the record up in php, all I get are question marks.

    Here is the php code.

    //script under development for Commentary Project
    // Quote variable to make safe
    function quote_smart($SeeAlso)
    // Stripslashes
    if (get_magic_quotes_gpc()) {
    $SeeAlso = stripslashes($SeeAlso);
    // Quote if not a number or a numeric string
    if (!is_numeric($value)) {
    $SeeAlso = "'" . mysql_real_escape_string($SeeAlso) . "'";
    return $SeeAlso;
    if(empty($MTH) && empty($RWP) && empty($SCR) && empty($STD) && empty($VWS) && empty($WES) && empty($ACL) && empty($BRC) && empty($BRN)  && empty($CAL)  && empty($DAR)  && empty($GBT)  && empty($GIL)  && empty($JFB)  && empty($KDC)) 
                   // {
                    // header("location: errorpage.php"); 
                   // exit; 
                    // } 
    $MTH1 = $_GET['MTH'];
    $RWP1 = $_GET['RWP'];
    $SCR1 = $_GET['SCR'];
    $STD1 = $_GET['STD'];
    $VWS1 = $_GET['VWS'];
    $WES1 = $_GET['WES'];
    $ACL1 = $_GET['ACL'];
    $BRC1 = $_GET['BRC'];
    $BRN1 = $_GET['BRN'];
    $CAL1 = $_GET['CAL'];
    $DAR1 = $_GET['DAR'];
    $GBT1 = $_GET['GBT'];
    $GIL1 = $_GET['GIL'];
    $JFB1 = $_GET['JFB'];
    $KDC1 = $_GET['KDC'];
    $SeeAlso = $_GET['SeeAlso'];
    $username = "___";
    $password = "___";
    $hostname = "localhost";  
    $dbh = mysql_connect($hostname, $username, $password) 
        or die("Unable to connect to MySQL");    
    $dbname = "findthep_Comm4";
    mysql_select_db($dbname, $dbh); 
      $ACL = "'ACL'";
       $ACL = "''";
    $query = "SELECT * FROM `Comm_Clarke` WHERE `VerseRef` LIKE '%$SeeAlso%' AND `Source` = $ACL ORDER BY `Index` ASC";
    The field containing the question marks is a field called Text. To be brief I have left out a lot of code between the above segment and the following segment.

        while(list($Source, $VerseRef,$Text)= mysql_fetch_row($result2))
    Thank you in advance for any replies
  2. HowdeeDoodee

    HowdeeDoodee Thread Starter

    Aug 26, 2004
    I have solved this problem for me but I am not sure about what others see on their machine.

    I changed the collation to the text field with the Hebrew characters to collation = utf8_bin

    I inserted the following line above the php code.

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-8-i">

    When I loaded the web page with Hebrew characters, I received a message to insert the XPHome disc and install the Hebrew language pack/character set from the install disc. Therefore, I installed the Hebrew language pack.

    For me on my machine, I can now see the Hebrew characters in the php page.

    http://www.findthepower.net/CP/CommentaryP...eAlso=Gen 1:1

    Thank you in advance.
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/725218

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice