-1

I have hard coded Chinese characters in peoplecode. It is written to a csv file. This csv file is attached via an email notification. However when the user receives the email and opens the csv file attachment, the Chinese characters are being shown as some weird symbols or characters. I am using app engine by the way and uses PSUNX. Anyone have any workaround about this?

gonggong
  • 69
  • 1
  • 2
  • 13
  • Can you add your code for how you are creating the file? What character set are you using when creating the file? – Darryls99 Oct 28 '14 at 15:47
  • `&file_header = '雇员 ID' &filename = &file_prefix | PPL_AET.COUNTRY | "_" | PPL_AET.MONTH | "MTH_" | &Emplid | "_" | %Date | ".csv"; &filepath = %FilePath | &filename; &file = GetFile(&filepath, "w", "UTF8", %FilePath_Absolute); &file.WriteLine(&file_header);` @Darryls99 – gonggong Oct 28 '14 at 16:05

2 Answers2

0

The problem appears to be that you are not writing the same character set that your recipient is opening the file with. Since you are using UTF8, your choice does support the Chinese characters.

I see you have a couple options:

  1. Find out the character set your recipient is using and use that character set when writing the file.
  2. Educate the recipient that the file is in UTF8 and that they may need to open it differently. Here is a link on how to open a CSV using UTF8 in Excel.
Community
  • 1
  • 1
Darryls99
  • 821
  • 4
  • 10
  • Thanks @Darryls99 . Number 2 seems like the best solution so far. Is there any other way you know of so that the chinese characters will appear as it is in the email attachment? – gonggong Oct 29 '14 at 04:36
0

Alright managed to solve it using UTF8BOM.

gonggong
  • 69
  • 1
  • 2
  • 13