Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2005
    Posts
    4

    Unanswered: PHP and mysql - Unicode data Retrival

    Hi everybody,

    please help anyone.

    I've used phpmyadmin tool to insert unicode datas into mysql database and able to browse from the phpmyadmin properly( my datas are in indic languages).

    when i'm trying to display in html page(using php script) i'm getting only ??? marks. But my scripts working fine for english text.How i can resolve this.

    thanks

    P.Palani

  2. #2
    Join Date
    Jan 2005
    Location
    Rees / Germany
    Posts
    34
    Hello.

    I think you just should select the right text encoding in your html-code.
    You can select the right one in a html meta tag.
    Code:
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
    <!--  for example //-->
    Greetz,
    Andreas
    In Nomine Padri Et Fili Et Spiritus Sancti

  3. #3
    Join Date
    Jan 2005
    Posts
    4
    Hi sir,
    thanks for your reply.
    i have used that charset in my metatag. but same problem.

    i saw in some other forum to use as below.

    $DB = new mysqli('localhost', 'user', 'root', 'dbname');

    $DB->query("SET NAMES 'utf8'"); and so on to encode the characters in utf-8 format.
    when i tried to use like this its giving error udefined functionmysqli(---------)
    i'm using php5.

    what will be wrong?.

  4. #4
    Join Date
    Jan 2005
    Location
    Rees / Germany
    Posts
    34
    Hi!

    Sir Hmkay...

    Have a look about this:
    http://de3.php.net/manual/en/ref.mysqli.php

    That will solve your problem, i hope... ^^

    Greetz,
    Andreas
    In Nomine Padri Et Fili Et Spiritus Sancti

  5. #5
    Join Date
    Jan 2005
    Posts
    4

    Exclamation

    Hi,
    thanks for your link. But i could not exactly how to configure it. i just tried to change the php.ini file(removed the semicolon found before the line extension=php_mysqli.dll) but still now working. since i'm new to PHP pl give me step by step example or anyother alternative.

    I'm using windows xp

    mysql 4.1.7,PHP 5 and Apache server ( all by XAMPP package).

    thanks
    P.Palani

  6. #6
    Join Date
    Jan 2005
    Location
    Rees / Germany
    Posts
    34
    Hey
    I'm sorry, but i have no experience with php5.
    Do you have installed the needed dll-File php_mysqli.dll? If you have installed this dll, i really have no clue...


    But something else... In your first post, you wrote this:
    when i'm trying to display in html page(using php script) i'm getting only ??? marks.
    If this the case for all your text or just for special characters? Which characters?

    Greetz,
    Andreas
    In Nomine Padri Et Fili Et Spiritus Sancti

  7. #7
    Join Date
    Jan 2005
    Posts
    4
    Thanks ,
    I'd successfully configured the php.ini file to work with mysqli function.
    but still not able to find exact coding sample to deal with unicode characters. somebody suggested to use utf8_encode() to save the data in db and utf8_decode() to retrieve. this not working fine for indian langugaes.(some multibyte characters are displaying diffrently not as usual.

    P.Palani

  8. #8
    Join Date
    Jan 2005
    Location
    Rees / Germany
    Posts
    34
    Indian Languages? Do they have special characters?
    Maybe you have to install special charsets? If you want to display asian chars, you also have to install a special charset. Maybe it's the same with the indian languages... Maybe you could try that out.

    Hope it will help you!
    Andreas
    In Nomine Padri Et Fili Et Spiritus Sancti

Posting Permissions

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