Databases with Charset NONE are not reading correctly

460 views
Skip to first unread message

Cristian Ionaș

unread,
Mar 10, 2021, 4:03:23 AM3/10/21
to firebird-net-provider
Hello! There are some old database that is based on NONE encoding and have unique Latin characters like á and are read like ? . Now, the correct form is to read DB in correct charset form NONE and it was specified in connection string, but the library FirebirdSql.Data.FirebirdClient doesn't read these values also if is specified that charset = NONE. The result now is like "edit�es", but needs to be with an apostrophe. I'm using .NET Core and FirebirdSql.Data.FirebirdClient version 7.10.1, I tried to downgrade, and is the same. How can I resolve this situation?

Jiří Činčura

unread,
Mar 10, 2021, 4:06:57 AM3/10/21
to 'Mr. John' via firebird-net-provider
To resolve the situation fix the charset and use (probably) UTF-8.

BTW the NONE isn't any charset. Is basically whatever the default is (on the system), which on .NET Core/.NET 5 is UTF-8.

--
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/

Cristian Ionaș

unread,
Mar 10, 2021, 4:17:49 AM3/10/21
to firebird-n...@googlegroups.com
Thank you for your reply! The problem is that the database has encoding NONE, but if I will try with .NET Framework do you think it will work?

--
You received this message because you are subscribed to the Google Groups "firebird-net-provider" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-net-pro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebird-net-provider/f2a43882-4cf4-4630-b3d7-e351991c2974%40www.fastmail.com.

Jiří Činčura

unread,
Mar 10, 2021, 4:31:56 AM3/10/21
to 'Mr. John' via firebird-net-provider
.NET Framework defaults to ANSI, hence if your Windows locale settings uses Latin 1 and everything is Latin 1 in database, then it is going to work.

Gerdus van Zyl

unread,
Mar 10, 2021, 5:20:56 AM3/10/21
to firebird-n...@googlegroups.com
Instead of using .net framework try setting the Charset on the connection string to WIN1252.

Cristian Ionaș

unread,
Mar 10, 2021, 6:06:28 AM3/10/21
to firebird-n...@googlegroups.com
 I tried, but unsuccessful. Thank you!
image.png
image.png

Jiří Činčura

unread,
Mar 10, 2021, 6:46:17 AM3/10/21
to 'Mr. John' via firebird-net-provider
FbCharset is enum for different purpose (for FbParameter). You need to specify "WIN1252".

Cristian Ionaș

unread,
Mar 10, 2021, 7:12:01 AM3/10/21
to firebird-n...@googlegroups.com
It's the same exception...Thank you! I will try with .NET Framework.


--
You received this message because you are subscribed to the Google Groups "firebird-net-provider" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-net-pro...@googlegroups.com.

Jiří Činčura

unread,
Mar 10, 2021, 7:17:36 AM3/10/21
to 'Mr. John' via firebird-net-provider
Maybe you need to use "windows-1252", I'm not sure from top of my head. I haven't used anything else but utf-8 for ages.
Reply all
Reply to author
Forward
0 new messages