[Webinar] Streamline your web hosting managementRegister Today


How to write a CSV file with Japanese characters?

Posted on 2005-04-08
Medium Priority
Last Modified: 2010-04-16
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.
Question by:ehanoi2
1 Comment

Accepted Solution

tuanbass earned 200 total points
ID: 13734968
Dim m_stream As New System.IO.MemoryStream
Dim output As String
Dim writer As New System.IO.StreamWriter(m_stream, System.Text.Encoding.Unicode)

Dim s1 As String = ApplicationResource.GetString("Header_PA5110_PartName")
writer.Write(s1 & vbTab & s1 & vbTab & s1)

Hope this helps!

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Planning to migrate your EDB file(s) to a new or an existing Outlook PST file? This video will guide you how to convert EDB file(s) to PST. Besides this, it also describes, how one can easily search any item(s) from multiple folders or mailboxes…
This video tutorial shows you the steps to go through to set up what I believe to be the best email app on the android platform to read Exchange mail.  Get the app on your phone: The first step is to make sure you have the Samsung Email app on your …
Suggested Courses

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question