Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2016-12-31 12:19:42

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: rvm_latin1_to_utf8 (v0.5)

The plugin was built for pre-4.6 versions. I didn’t expect anyone to keep using latin1 for so long.

Try this:
replace global $txpcfg; with global $txpcfg, $DB;
replace mysql_get_server_info() with mysqli_get_server_info($DB->link)
replace mysql_fetch_row with mysqli_fetch_row

Offline

#50 2017-01-01 12:37:41

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,079
Website

Re: rvm_latin1_to_utf8 (v0.5)

@Ruud – I was surprised that your plugin didn’t work with TXP 4.6 – as it has been referenced quite a few times recently. That is why I posted the errors I got when trying.

(Personally I don’t need it, my databases have been UTF-8 since time immemorial)

Anyway, if people have issues with funky encodings,, best advise them to correct the DB before updating to the TXP 4.6.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#51 2017-01-03 14:57:01

alesh
Member
From: Miami, FL
Registered: 2005-04-13
Posts: 228
Website

Re: rvm_latin1_to_utf8 (v0.5)

ruud wrote #303447:

Post your diagnostics please.

Sorry for the late reply! Things hectic over here. I hope there are some suggestions:

Textpattern version: 4.6.2 (8412e32468526e075446b881d13bd9ce)
Last Update: 2016-11-18 14:08:56/2016-11-18 14:07:54
Document root: /home/acch/artandculturecenter.org
$path_to_site: /home/acch/artandculturecenter.org
Textpattern path: /home/acch/artandculturecenter.org/textpattern
Permanent link mode: title_only
Temporary directory path: /home/acch/artandculturecenter.org/textpattern/tmp
Site URL: artandculturecenter.org
PHP version: 5.5.38
GD Image Library: version bundled (2.1.0 compatible), supported formats: GIF, JPG, PNG
Server TZ: America/Los_Angeles
Server Local Time: 2017-01-03 06:54:29
DST enabled?: 0
auto_dst: 1
Time Zone: America/New_York (-18000)
MySQL: 5.6.25-log
db_server_time: 2017-01-03 06:54:29
db_server_timeoffset: 1 s
db_global_timezone: SYSTEM
db_session_timezone: SYSTEM
Locale: en_US.UTF-8
Server: Apache
PHP Server API: cgi-fcgi
RFC 2616 headers: 0
Server OS: Linux 3.2.61-grsec-modsign
Active plugins: etz_striptags-0.1, rss_suparchive-0.18, soo_alesh_custom_list-0.2.2, mka_fontimg-0.7.2, etc_query-1.3.3, cbe_if_article_released-0.1, rss_article_edit-0.1, upm_insert_tab-0.3, stm_article_order-0.2, upm_textile-0.3, soo_editarea-0.1.3, rah_knots-0.2, glz_custom_fields-1.4.0-beta
theme_name: classic 4.6.2

.htaccess file contents: 
------------------------
# BEGIN Textpattern
#DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes
#ErrorDocument 403 default

<IfModule mod_rewrite.c>
    RewriteEngine On
    #RewriteBase /relative/web/path/

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^(.+) - [PT,L]

    RewriteCond %{REQUEST_URI} !=/favicon.ico
    RewriteRule ^(.*) index.php

    RewriteCond %{HTTP:Authorization}  !^$
    RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>

#php_value register_globals 0

<IfModule mod_mime.c>
    AddType image/svg+xml  svg svgz
    AddEncoding gzip       svgz
</IfModule>
# END Textpattern

------------------------

Yes, I have tried turning it off and on.

Offline

#52 2017-01-04 20:08:58

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: rvm_latin1_to_utf8 (v0.5)

@alesh, see my earlier post about editing the plugin. Let me know if that solves the problem and I’ll update the plugin for future users.

Offline

#53 2017-01-05 22:01:00

alesh
Member
From: Miami, FL
Registered: 2005-04-13
Posts: 228
Website

Re: rvm_latin1_to_utf8 (v0.5)

ruud wrote #303483:

@alesh, see my earlier post about editing the plugin. Let me know if that solves the problem and I’ll update the plugin for future users.

Ok, I DID IT.

(1) The plugin didn’t report an error after I activated it. Still sitting there, Active. Nothing apparently changed. I went and changed config.php to utf8, which fixed my question-mark characters on old articles, but BROKE the extended characters on newer articles:

No good, so I quickly changed config.php back to latin1. Does this mean the plugin isn’t working, or that I’ve got bigger problems than it can fix?

Edit: Just realized the actual explanation of my problem isn’t on this thread. Sorry to be a hassle, but please have a look.

Last edited by alesh (2017-01-05 22:02:02)


Yes, I have tried turning it off and on.

Offline

#54 2017-01-26 21:55:55

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: rvm_latin1_to_utf8 (v0.5)

Plugin updated to be compatible with TXP 4.6 and higher.
Unfortunately it no longer works with older versions. If you need a copy that supports older TXP versions, let me know and I’ll give you a download link, but do consider upgrading to 4.6 first.

Offline

#55 2017-07-11 12:47:33

Gallex
Member
Registered: 2006-10-08
Posts: 1,289

Re: rvm_latin1_to_utf8 (v0.5)

ruud wrote #303698:

Plugin updated to be compatible with TXP 4.6 and higher.
Unfortunately it no longer works with older versions. If you need a copy that supports older TXP versions, let me know and I’ll give you a download link, but do consider upgrading to 4.6 first.

i would like to update my txp 4.5.7 > 4.6.2, but i’m afraid to do that :), cause last time i tried this, i got problem i described here.

what you suggest to do: update txp to 4.6.2 and then install/activate your plugin latest version or leave it to 4.5.7 and first try to convert charset to UTF-8 with older version of a plugin?

there are some articles created at least 7-8 years ago…

diagnostic tool:

Textpattern version: 4.5.7 (r5900)
PHP version: 5.4.45
MySQL: 5.5.31
Locale: en_GB.UTF-8

Charset (default/config): latin1/iso-8859-1
character_set_client: latin1
character_set_connection: latin1
character_set_database: latin1
character_set_filesystem: binary
character_set_results: latin1
character_set_server: latin1
character_set_system: utf8
character_sets_dir: /usr/share/mysql/charsets/
18 Tables: OK

ruud, is this the latest?

Offline

#56 2017-07-12 15:42:53

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: rvm_latin1_to_utf8 (v0.5)

Yes, that’s the latest version. Either way should work. Make a backup first.

Offline

#57 2017-07-12 15:51:35

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: rvm_latin1_to_utf8 (v0.5)

Also remember to change your dbcharset in the config file to: $txpcfg['dbcharset'] = 'utf8;, or does the plugin do that too? It’s been ages since I used it.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#58 2017-07-12 16:04:41

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: rvm_latin1_to_utf8 (v0.5)

Also… Isn’t txp v4.6.x updating the db to utf8mb4?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#59 2017-07-13 06:41:33

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: rvm_latin1_to_utf8 (v0.5)

colak wrote #306265:

Also remember to change your dbcharset in the config file to: $txpcfg['dbcharset'] = 'utf8;, or does the plugin do that too? It’s been ages since I used it.

The plugin does that.

colak wrote #306266:

Also… Isn’t txp v4.6.x updating the db to utf8mb4?

No, that charset is only used for new installs

Offline

#60 2017-07-13 08:56:24

Gallex
Member
Registered: 2006-10-08
Posts: 1,289

Re: rvm_latin1_to_utf8 (v0.5)

ruud wrote #306263:

Yes, that’s the latest version. Either way should work. Make a backup first.

could you please provide me download link for older version? i will try second way first

Offline

Board footer

Powered by FluxBB