"Invalid character set specified." exception when set the Charset = FbCharset.Windows1252.ToString()

390 views
Skip to first unread message

Luciano Rodrigues Nunes Mendes

unread,
May 24, 2022, 7:32:14 AM5/24/22
to firebird-net-provider
Hi Guys,

An "Invalid character set specified." exception is happening when I set the Charset = FbCharset.Windows1252.ToString() in the FbConnectionStringBuilder (See image attached)

This issue does not happen when I set the Charset = FbCharset.Utf8.ToString().

Should I have to open a bug for this issue?

Best Regards,
Luciano
Exception.png

Mark Rotteveel

unread,
May 24, 2022, 7:37:20 AM5/24/22
to firebird-n...@googlegroups.com
FbCharset.Windows1252.ToString() results in Windows1252, which is not a
valid Firebird character set name (that is WIN1252).

As far as I can tell, the names of those enum values match the C# names
for the character sets, not the Firebird name of the character set.
Using them for their name seems incorrect usage (and the fact it works
for FbCharset.Utf8 is just accidental).

Mark
--
Mark Rotteveel

Jiří Činčura

unread,
May 24, 2022, 7:37:32 AM5/24/22
to 'Mr. John' via firebird-net-provider

Luciano Rodrigues Nunes Mendes

unread,
May 24, 2022, 7:42:30 AM5/24/22
to firebird-n...@googlegroups.com
Hi Mark and Jiří

Thanks for your prompt reply.

So It is wrong to use Charset = FbCharset.Utf8.ToString() right?

What is the right way to set the Charset to UTF8? just Charset = "UTF8"?

Thanks in advance,
Luciano


--
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/eea9243b-8af7-48de-9738-76d78e23c92f%40www.fastmail.com.

Mark Rotteveel

unread,
May 24, 2022, 7:44:58 AM5/24/22
to firebird-n...@googlegroups.com
On 24-05-2022 13:42, Luciano Rodrigues Nunes Mendes wrote:
> So It is wrong to use Charset = FbCharset.Utf8.ToString() right?

Yes

> What is the right way to set the Charset to UTF8? just Charset = "UTF8"?

Yes

Mark
--
Mark Rotteveel
Reply all
Reply to author
Forward
0 new messages