Skip to content

Fix encoding bug caused by PR #80 - #81

Merged
franciscojunior merged 1 commit into
npgsql:masterfrom
glenebob:backend_text_encoding
Oct 25, 2013
Merged

franciscojunior merged 1 commit into
npgsql:masterfrom
glenebob:backend_text_encoding

Conversation

@glenebob

Copy link
Copy Markdown
Contributor

Francisco,

Here's the fix for the bug mentioned in PR #77.

-Glen.

Add tests exposing bad quoting of types other than text and bytea.
Fix generic quoting code.
franciscojunior added a commit that referenced this pull request Oct 25, 2013
@franciscojunior
franciscojunior merged commit 4f4fc65 into npgsql:master Oct 25, 2013
@franciscojunior

Copy link
Copy Markdown
Member

I just noticed that I'm getting a formatting error when running TimeStampHandling and the prepared equivalent. This is the problematic line:

DateTime inVal = DateTime.Parse("02/28/2000 02:20:20 PM");

I think in my culture, pt-br, this isn't a valid date format.

By changing it to:

DateTime inVal = DateTime.Parse("02/28/2000 02:20:20 PM", new CultureInfo("en-US"));

Makes the test pass again.

@glenebob

Copy link
Copy Markdown
Contributor Author

Woopsie! Sorry for that.

It also seems to work using CultureInfo.InvariantCulture. Maybe try that
as it's more neutral.

-Glen

On Fri, Oct 25, 2013 at 12:32 PM, Francisco Figueiredo Jr. <
[email protected]> wrote:

I just noticed that I'm getting a formatting error when running
TimeStampHandling and the prepared equivalent. This is the problematic line:

DateTime inVal = DateTime.Parse("02/28/2000 02:20:20 PM");

I think in my culture, pt-br, this isn't a valid date format.

By changing it to:

DateTime inVal = DateTime.Parse("02/28/2000 02:20:20 PM", new CultureInfo("en-US"));

Makes the test pass again.

—
Reply to this email directly or view it on GitHubhttps://github.com//pull/81#issuecomment-27119478
.

@franciscojunior

Copy link
Copy Markdown
Member

Sure!
InvariantCulture also works here.

@glenebob

Copy link
Copy Markdown
Contributor Author

Do you want to issue another PR for this?

On Fri, Oct 25, 2013 at 1:30 PM, Francisco Figueiredo Jr. <
[email protected]> wrote:

Sure!

—
Reply to this email directly or view it on GitHubhttps://github.com//pull/81#issuecomment-27123271
.

@glenebob

Copy link
Copy Markdown
Contributor Author

Actually, hold off a little bit. I think I just noticed a problem in the
new encoding code that could cause the EF code to fail. If it really is a
problem, I'll open a new PR with the fix, and also fix the test.

-Glen

On Fri, Oct 25, 2013 at 1:52 PM, Glen Parker [email protected] wrote:

Do you want to issue another PR for this?

On Fri, Oct 25, 2013 at 1:30 PM, Francisco Figueiredo Jr. <
[email protected]> wrote:

Sure!

—
Reply to this email directly or view it on GitHubhttps://github.com//pull/81#issuecomment-27123271
.

@franciscojunior

Copy link
Copy Markdown
Member

Yes, please. I think it may seem like an overkill to create a pr just for
that, but from what I read about a good git workflow, it is OK to create a
pr even for the smallest commits. :-)
Em 25/10/2013 18:52, "Glen Parker" [email protected] escreveu:

Do you want to issue another PR for this?

On Fri, Oct 25, 2013 at 1:30 PM, Francisco Figueiredo Jr. <
[email protected]> wrote:

Sure!

—
Reply to this email directly or view it on GitHub<
https://github.com/franciscojunior/Npgsql2/pull/81#issuecomment-27123271>
.

—
Reply to this email directly or view it on GitHubhttps://github.com//pull/81#issuecomment-27124750
.

@franciscojunior

Copy link
Copy Markdown
Member

OK.
Em 25/10/2013 19:21, "Glen Parker" [email protected] escreveu:

Actually, hold off a little bit. I think I just noticed a problem in the
new encoding code that could cause the EF code to fail. If it really is a
problem, I'll open a new PR with the fix, and also fix the test.

-Glen

On Fri, Oct 25, 2013 at 1:52 PM, Glen Parker [email protected] wrote:

Do you want to issue another PR for this?

On Fri, Oct 25, 2013 at 1:30 PM, Francisco Figueiredo Jr. <
[email protected]> wrote:

Sure!

—
Reply to this email directly or view it on GitHub<
https://github.com/franciscojunior/Npgsql2/pull/81#issuecomment-27123271>
.

—
Reply to this email directly or view it on GitHubhttps://github.com//pull/81#issuecomment-27126941
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants