Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => PostgreSQL and SQLite Support => Topic started by: astroannie on April 02, 2018, 03:30:21 AM

Title: Database error -- Please try again. (when pasting from anything)
Post by: astroannie on April 02, 2018, 03:30:21 AM
This occurs because of incompatible characters.  The characters in question are quotation marks (left and right), apostrophes, and emdashes.  If I manually replace them with ", ' and -- I don't get the error message.  When I do get the error message, I have to abort that message and start a new one, as fixing the existing message and resubmitting gives a message that I already posted. 

SMF 2.0.15 with Postgres.  (I don't operate the server so am unsure how to get the Postgres version #, but could find out tomorrow during business hours). 

Is there a patch or mod I need to fix this issue?   Or is there a setting I need to tweak?
Title: Re: Database error -- Please try again. (when pasting from anything)
Post by: GigaWatt on April 02, 2018, 05:42:39 AM
Have you converted the database to UTF-8 with the SMF conversion tool (in the admin panel)?
Title: Re: Database error -- Please try again. (when pasting from anything)
Post by: albertlast on April 02, 2018, 07:18:25 AM
Which pg version you use?
Which charcode got your database?
Please check you database log (from pg not smf) ther you see the complet error message.
Title: Re: Database error -- Please try again. (when pasting from anything)
Post by: astroannie on April 02, 2018, 09:34:30 PM
Have you converted the database to UTF-8 with the SMF conversion tool (in the admin panel)?

I cannot locate this conversion tool.  Can you tell me where in the docs to read about it or where in the admin panel to find it?  I'm 2.0.15 
Title: Re: Database error -- Please try again. (when pasting from anything)
Post by: astroannie on April 02, 2018, 09:36:28 PM
Which pg version you use?
Which charcode got your database?
Please check you database log (from pg not smf) ther you see the complet error message.

I think converting it will fix it if I can figure out how:

Quote
Database Error: ERROR: invalid byte sequence for encoding "UTF8": 0x92
Apply Filter: Only show the errors from this file File: /var/www/thisgrrl.com/smf/Sources/Subs-Post.php
Line: 1816
Title: Re: Database error -- Please try again. (when pasting from anything)
Post by: astroannie on April 02, 2018, 10:55:36 PM
PostgreSQL 9.6 is the version I have.

Also, my admin says the database isn't the problem -- SMF is not properly handling the characters and converting them from "windows page encoding" to UTF8.

"When you connect to the database with UTF8, you're making a promise to the database that you're going to give it UTF8 and these codes are NOT UTF8 and the database can't cope." says my admin.
Title: Re: Database error -- Please try again. (when pasting from anything)
Post by: astroannie on April 02, 2018, 11:09:07 PM
“I saw she had a shortcut for something named ‘Lobachevsky’ on her desktop,” Lindeman said.

(The above is an example of what I'm copy/pasting from a vBulletin forum to my SMF forum -- it is from a story I authored that won a prize challenge). 
Title: Re: Database error -- Please try again. (when pasting from anything)
Post by: albertlast on April 03, 2018, 05:39:11 AM
That the error is in smf is clear (was never the question).
The issue is that the smf say it send the data in utf8 but send is in a different charcode,
maybe in your setting a different charcode is defined.
Title: Re: Database error -- Please try again. (when pasting from anything)
Post by: GigaWatt on April 03, 2018, 06:00:51 AM
I cannot locate this conversion tool.  Can you tell me where in the docs to read about it or where in the admin panel to find it?  I'm 2.0.15

Admin --> Maintenance --> Forum Maintenance --> Database --> Convert HTML-entities to UTF-8 characters
Title: Re: Database error -- Please try again. (when pasting from anything)
Post by: albertlast on April 03, 2018, 06:04:35 AM
You shouldn't touch the convert tool,
so long you smf and you database "speak" different charcode without knowing each other.
Title: Re: Database error -- Please try again. (when pasting from anything)
Post by: astroannie on April 03, 2018, 07:17:13 AM
In the Admin > Maintenance > Forum Maintenance > Database area I see only

Optimize

Backup

Do I need to install a package?
Title: Re: Database error -- Please try again. (when pasting from anything)
Post by: albertlast on April 03, 2018, 09:01:26 AM
This function exists in 2.0.x only for mysql setup and only when you activate utf8 mode on smf side.
Title: Re: Database error -- Please try again. (when pasting from anything)
Post by: astroannie on April 03, 2018, 11:20:02 AM
so, basically, I'm screwed because I don't have MySQL? 

Is there a package I can install that will solve this? 
Title: Re: Database error -- Please try again. (when pasting from anything)
Post by: albertlast on April 03, 2018, 11:30:35 AM
Nope you screwed because you don't read.
I ask you which charcode is setup in your settings and you didn't awnser.
Title: Re: Database error -- Please try again. (when pasting from anything)
Post by: astroannie on April 03, 2018, 11:55:43 AM
I ask you which charcode is setup in your settings and you didn't awnser.

Where do I find that? 
Title: Re: Database error -- Please try again. (when pasting from anything)
Post by: GigaWatt on April 03, 2018, 03:29:10 PM
Admin --> Configuration --> Languages --> Edit Languages
Title: Re: Database error -- Please try again. (when pasting from anything)
Post by: astroannie on April 03, 2018, 04:24:19 PM
Bless all y'all ... it was set to ISO-mumbo-jumbo and I installed and set it to UTF8 and it's happy now.