Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2018-07-09 15:28:01

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 1,449
Website

Re: Odd Characters, Blank Templates

In Safari when i change the Text Encoding view to Western ISO Latin 1 the odd characters disappear.

I hope you are not copying text from Word documents and then pasting into your Write panel in Textpattern.

Years ago i had a similar problem with an older format etting – unicode swedish_ci i think – I solved by running the DB through a script – see this:

Converting your MySQL database to UTF8

P.S. I NEVER copy/paste from Word documents. Place all text into a neutral text editor. BBedit or Notepad or Textmate … before pasting into your CP


…. texted postive

Offline

#12 2018-07-09 15:32:27

jrmartin
Member
Registered: 2013-03-07
Posts: 75

Re: Odd Characters, Blank Templates

bici wrote #312928:

In Safari when i change the Text Encoding view to Western ISO Latin 1 the odd characters disappear.

I hope you are not copying text from Word documents and then pasting into your Write panel in Textpattern.

Years ago i had a similar problem with an older format etting – unicode swedish_ci i think – I solved by running the DB through a script – see this:

Converting your MySQL database to UTF8

P.S. I NEVER copy/paste from Word documents. Place all text into a neutral text editor. BBedit or Notepad or Textmate … before pasting into your CP

Don’t worry, I don’t even have Word on my computer. Everything is written on the keyboard.

Offline

#13 2018-07-10 18:16:56

jrmartin
Member
Registered: 2013-03-07
Posts: 75

Re: Odd Characters, Blank Templates

So the hosting provider reports that a database upgrade happened at the time we noticed the odd characters.

I’ve gone through the pages with those characters (which were indeed pasted quotes and things) and replaced them. Now they’re good.

But there are still issues. For example, if I write “the emperors’ hats,” the trailing apostrophe causes that paragraph not to display on the html page.

And…my page templates included ©, which caused them not to display in the form. Scary. I went into the database and copied default and archive forms and changed the character to & copy; and pasted them into the form and all was well.

So I’m still worried about upgrading, given these problems.

Last edited by jrmartin (2018-07-10 18:19:04)

Offline

#14 2018-07-10 18:24:20

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,246
Website

Re: Odd Characters, Blank Templates

There are plugins which help with the upgrade of the db character set.

Try: rvm_latin1_to_utf8 and rvm_utf8_to_utf8mb4 after that, both are downloadable from the same page. Remember to backup your db before you install the plugins.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#15 2018-07-22 07:28:21

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,435
Website

Re: Odd Characters, Blank Templates

I read you did a database upgrade on this thread but saw no difference in the files. You can check if that is really the case by exporting your updated database and then comparing the old and new using a diff tool.

One further idea – do you have the line:

$txpcfg['dbcharset'] = 'utf8';

as shown here in your config.php file?

If you want some off-forum assistance, send me an email…


TXP Builders – finely-crafted code, design and txp

Offline

#16 2018-07-22 20:33:57

giz
Member
From: New Zealand
Registered: 2004-07-26
Posts: 166
Website

Re: Odd Characters, Blank Templates

I had a similar problem on a large site a couple of weeks ago (the host upgraded to a new cloud platform / mySQL version change – MariaDB v10 or 11).

After hours of futzing I resorted to brute force – full SQL dump onto my Mac, and then search and replace the offending characters with their ‘dumb’ equivalents eg \" instead of the intended . Note: the offending characters display perfectly in the mysql source.

After importing the changes back to the live site, the forms showed up correctly again, allowing us to manually correct the characters.

Last edited by giz (2018-07-22 20:36:32)

Offline

#17 2018-08-02 16:54:43

jrmartin
Member
Registered: 2013-03-07
Posts: 75

Re: Odd Characters, Blank Templates

jakob wrote #313108:

I read you did a database upgrade on this thread but saw no difference in the files. You can check if that is really the case by exporting your updated database and then comparing the old and new using a diff tool.

One further idea – do you have the line:

$txpcfg['dbcharset'] = 'utf8';...

as shown here in your config.php file?

If you want some off-forum assistance, send me an email…

Thanks for your offer. I think I have it figured out. The database did indeed work, but about 30 articles had blank bodies. But this time I just copied the text out of the database and pasted it into the form and it all worked without changing the offending characters, which were evidently fixed in the database upgrade.

So now I think I’m ready to upgrade to 4.7.1 from 4.6.2 even though diagnostics is still reporting that 4.7.0 is available. I can upgrade directly to 4.71, can’t I?

Offline

#18 2018-08-02 22:56:18

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,653
Website

Re: Odd Characters, Blank Templates

jrmartin wrote #313227:

I can upgrade directly to 4.71, can’t I?

Sure you can (assuming you are satisfied with the current state / integrity of your site, after fixing all oddities). As always, having a DB back-up is recommended.

Offline

#19 2018-08-02 23:02:29

jrmartin
Member
Registered: 2013-03-07
Posts: 75

Re: Odd Characters, Blank Templates

All the articles look good, only the languages page looks screwed up, like this:

?????? ???? Install 23 Mar 2018 06:50:39 AM - -
????????? Install 09 Oct 2017 09:04:03 AM - -
Bosanski Install 09 Oct 2017 09:04:03 AM - -
Catal Install 09 Oct 2017 09:04:03 AM

Offline

#20 2018-08-03 05:28:43

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,246
Website

Re: Odd Characters, Blank Templates

Can you post your diagnostics?


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

Board footer

Powered by FluxBB