Jump to content

catinuk

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Female
  • Location
    London

catinuk's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I tried, but it seems doesn't change anything. i can view the Chinese characters in notepad, but if i open it in Excel, it becomes funny code
  2. I wish to load some Chinese characters into a csv file, however the following code only works with English words, anyone knows how to change the code so it works with Chinese characters? Many thanks, Cat $pfw_file_name = "registration.csv"; $pfw_first_row = "title,First Name,Last Name,Job Title,Company,Email,Telephone Number,Fax Number,Address 1,Address 2,City,County,Postcode,Country,ID,Other\r\n"; //Content-type: text/html; charset=utf-8\r\n $pfw_values = "$title,$firstName,$lastName,$jobTitle,$company,$email,$tel,$fax,$address1,$address2,$city,$county,$postcode,$country,$id,$other\r\n"; $pfw_is_first_row = false; if(!file_exists($pfw_file_name)) { $pfw_is_first_row = true; } if (!$pfw_handle = fopen($pfw_file_name, 'a+')) { die("Cannot open file ($pfw_file_name)"); exit; } if ($pfw_is_first_row) { if (fwrite($pfw_handle, $pfw_first_row ) === FALSE) { die("Cannot write to file ($pfw_filename)"); exit; } } if (fwrite($pfw_handle, $pfw_values) === FALSE) { die("Cannot write to file ($pfw_filename)"); exit; } fclose($pfw_handle);
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.