• Welcome to Simple Machines Community Forum. Please login or sign up.
December 03, 2021, 12:35:51 PM

News:

SMF 2.1 RC4 has been released! Try it out and help us test! :) Read more.


Database error -- Please try again. (when pasting from anything)

Started by astroannie, April 02, 2018, 03:30:21 AM

Previous topic - Next topic

astroannie

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?

GigaWatt

Have you converted the database to UTF-8 with the SMF conversion tool (in the admin panel)?
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

albertlast

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.

astroannie

Quote from: 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)?

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 

astroannie

Quote from: 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.

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

QuoteDatabase 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

astroannie

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.

astroannie

"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). 

albertlast

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.

GigaWatt

Quote from: astroannie on April 02, 2018, 09:34:30 PM
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
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

albertlast

You shouldn't touch the convert tool,
so long you smf and you database "speak" different charcode without knowing each other.

astroannie

In the Admin > Maintenance > Forum Maintenance > Database area I see only

Optimize

Backup

Do I need to install a package?

albertlast

This function exists in 2.0.x only for mysql setup and only when you activate utf8 mode on smf side.

astroannie

so, basically, I'm screwed because I don't have MySQL? 

Is there a package I can install that will solve this? 

albertlast

Nope you screwed because you don't read.
I ask you which charcode is setup in your settings and you didn't awnser.

astroannie

Quote from: albertlast on April 03, 2018, 11:30:35 AM
I ask you which charcode is setup in your settings and you didn't awnser.

Where do I find that? 

GigaWatt

Admin --> Configuration --> Languages --> Edit Languages
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

astroannie

Bless all y'all ... it was set to ISO-mumbo-jumbo and I installed and set it to UTF8 and it's happy now. 

Advertisement: