我使用Big SQL安装程序安装了PostgreSQL(9.6.1),并安装了使用.msi安装程序的Npgsql(3.2.0)的新安装,但安装了非ASCII角色支持似乎被打破。编码= ASCII;和Encoding = UNICODE;在Npgsql 3连接字符串中不起作用
我的连接字符串是:
<add name="Northwind" connectionString="Database=Northwind;Server=localhost;Port=5432;User Id=postgres;Password=123;Encoding=ASCII;" providerName="Npgsql"/>
我得到这样的异常信息,回读非ASCII字符数据时:
System.Text.DecoderFallbackException : Unable to translate bytes [C3] at index 22 from specified code page to Unicode.
我一直在使用Encoding=UNICODE;
,而不是尝试过,但没有作品。