0

the datatable should send me the following data (Compte sociétaire) but it sends me back (Compte socié\u0082taire), what do I miss in my code to have the correct formatting?

Req = "select lib as libel from mvt order by lib";


            OracleCommand command = new OracleCommand(Req, myOracleConnection);

            OracleDataReader da = command.ExecuteReader();
            DataTable dataTable = new DataTable();

            dataTable.Load(da);

            dataTable.Locale = CultureInfo.CurrentCulture;


            if (dataTable != null && dataTable.Rows.Count > 0)
            {
                foreach (DataRow row in dataTable.Rows)
                {
                    foreach (var item in row.ItemArray)
                    {
                        myCollection.Add(item.ToString());
                    }
                }

                return myCollection;
            }
dudu
  • 1
  • 1
  • What do you get when you run the SELECT from SQL editor? What do you get from `SELECT DUMP(lib, 1016) FROM mvt ...`? – Wernfried Domscheit Mar 27 '18 at 09:02
  • return : item "Typ=1 Len=18 CharacterSet=WE8ISO8859P1: 43,6f,6d,70,74,65,20,73,6f,63,69,e9,82,74,61,69,72,65" object {string} – dudu Mar 27 '18 at 09:49
  • [U+0082](https://codepoints.net/U+0082) is a control character `BREAK PERMITTED HERE`, I would assume you have just wrong data in your database which was inserted wrongly by accident. – Wernfried Domscheit Mar 27 '18 at 11:12
  • thank you, it came from the table, I retype by hand in the table and it works again – dudu Mar 28 '18 at 08:02

0 Answers0