Probelm with ExcuteFiles DB Script on Thai language

Jun 24, 2009 at 1:20 AM

i found this version not support DB Script when i excute data in Thai language.

so i fixed it by i edit method  on Streamreader , just using Encoding.GetEncoding("windows-874") and set parameter bool for detectEncodingFromByteOrderMarks = false

public static void ExcuteFile(string filePath,string connectionString)

{

.................

using(Stream stream = System.IO.File.OpenRead(filePath))

{

   Old : reader = new StreamReader ( stream);

   New : reader = new StreamReader(stream,Encoding.GetEncoding("windows-874") ,false);

...................

}

 

................

}

now it's support Thai language