Results 1 to 4 of 4

Thread: how to insert the unicode to mysql?

  1. #1

    Thread Starter
    Addicted Member thirith's Avatar
    Join Date
    Oct 2004
    Posts
    196

    Question how to insert the unicode to mysql?

    Hi all!

    i try to insert the unicode to mysql by using INSERT statement, but data that inserted is not unicode it is latin character not code of uncode.
    so how can i insert unicode from php.

    best regards,
    thirith

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: how to insert the unicode to mysql?

    MySQL natively stores everything as Unicode starting with 4.1. But I believe the PHP DB drivers transcode, because PHP really only supports ISO-8859-1.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Addicted Member thirith's Avatar
    Join Date
    Oct 2004
    Posts
    196

    Re: how to insert the unicode to mysql?

    Quote Originally Posted by CornedBee
    MySQL natively stores everything as Unicode starting with 4.1. But I believe the PHP DB drivers transcode, because PHP really only supports ISO-8859-1.
    How should i do if i want to insert the unicode V4 to Mysql database through php?
    i try to use decode and encode but it is not work.

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: how to insert the unicode to mysql?

    You just need to treat unicode characters as integers in your applications. Heres some examples of how its done:

    http://www.randomchaos.com/document....hp_and_unicode
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

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



Click Here to Expand Forum to Full Width