By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,261 Members | 1,688 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,261 IT Pros & Developers. It's quick & easy.

Problem with encoding in dataload/-export

P: n/a
I am writing an application with a dataload class. The
development is done in Windows XP, and on the development
Pc I can do a dataload and export without any problems if
I use System.Text.UTF8Encoding on the datastream for
writing. The datafile is still in windows standard
codepage, also for the special chars for Scandinavia
(e.g. ,,).

However, when I transfer my application to a Pc running
Windows 2000, the special chars are converted to
gibberish (the lower ASCII chars are handled just fine).
Now, to handle it I have then tried to run the export
with UTF7Encoding, ASCIIEncoding and finally
UnicodeEncoding - none of them works for the special
chars and some not at all. Is there any other encoding I
should use?

I have also thought that the problem might not be in the
export but in the loading of the data (i.e. is the
datafile read correctly). For the dataload I use the
OleDbDatareader. As far as I can see, the OleDBDataReader
or OleDbConnection, does not include a property to
control Encoding for the load. I guess it could also be
something that is set as part of the the connection
string and not a regular property. But on Windows XP
where I develop and test I only need to control the
encoding for the StreamWriter and not for the load.

Help will be much appreciated.
With kind regards,

Frank M.
Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.