what is the default charcter set of text files? how to convert it to utf8 for mysql ?

Discussion in 'PHP' started by ramysarwat, Nov 9, 2010.

  1. #1
    what is the default character set of text files?

    and how to convert its data to utf8 to use it in mysql databse ?
     
    ramysarwat, Nov 9, 2010 IP
  2. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #2
    hi, are you trying to do a migration script here? utf8 convert table?
     
    bartolay13, Nov 9, 2010 IP
  3. KISS

    KISS Active Member

    Messages:
    135
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Open the text file in notepad, click save as and choose UTF ;)
     
    KISS, Nov 9, 2010 IP
  4. ramysarwat

    ramysarwat Peon

    Messages:
    164
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    no im trying to insert text from text file to mysql database

    the text files maybe in different languages
     
    ramysarwat, Nov 10, 2010 IP
  5. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #5
    ok. how do you generate this text file??? header function?
     
    bartolay13, Nov 10, 2010 IP
  6. ramysarwat

    ramysarwat Peon

    Messages:
    164
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    the text files are already exist i dont generate it
     
    ramysarwat, Nov 10, 2010 IP
  7. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #7
    ahhh... ok.. you will need to use fopen() fwrite() function..

    char set of the file will be regardless until the collation of the table is utf.
     
    bartolay13, Nov 10, 2010 IP