Link to home
Start Free TrialLog in
Avatar of ehanoi2
ehanoi2

asked on

How to write a CSV file with Japanese characters?

Here is my code:

  System.IO.FileStream f = new System.IO.FileStream("C:\\temp.csv", System.IO.FileMode.Create);
  byte[] bytes = System.Text.Encoding.UTF8.GetBytes("あ");
  f.Write(bytes, 0, bytes.Length);

The character saved in CSV file is in Japanese style but is not the input character.

Could experts here show me the way to solve this problem?

Many thanks.
eHanoi
ASKER CERTIFIED SOLUTION
Avatar of tuanbass
tuanbass

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial