Page 2 of 2

Re: How do I enter anad render Germany Characters: > ö <

Posted: Tue Apr 19, 2016 6:34 am
by simonmlewis
I just did an export.
Opened the Export file in Sublime.
Changed the Latin charset to UTF8.

Then imported it into PHPmyadmin.

And yet the characters are still showing diamonds.

Re: How do I enter anad render Germany Characters: > ö <

Posted: Tue Apr 19, 2016 7:04 am
by Celauran
Tried something like this? http://stackoverflow.com/questions/6115 ... n-to-utf-8

Back up your data first, obviously.

Re: How do I enter anad render Germany Characters: > ö <

Posted: Tue Apr 19, 2016 7:32 am
by requinix
That "Umrüstsätze" is UTF-8. Make sure your terminal is using UTF-8 and you'll see the proper characters.

Execute these queries with PHP code and have it output the results, then post it here. (Works just like a regular SELECT; the first will return multiple rows.)

Code: Select all

SHOW VARIABLES LIKE '%char%'

Code: Select all

SHOW CREATE TABLE <whatever table contains that data you posted>

Re: How do I enter anad render Germany Characters: > ö <

Posted: Tue Apr 19, 2016 8:02 am
by simonmlewis
[text]CREATE TABLE `products` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`titletag` varchar(30) DEFAULT NULL,
`metadescription` text,
`metakeywords` text,
`catid` int(3) DEFAULT NULL,
`catname` varchar(30) DEFAULT NULL,
`uk_catname` varchar(30) NOT NULL,
`subid` varchar(3) DEFAULT NULL,
`subname` varchar(50) DEFAULT NULL,
`uk_subname` varchar(30) NOT NULL,
`romancode` varchar(255) DEFAULT NULL,
`title` varchar(255) DEFAULT NULL,
`uk_title` varchar(30) NOT NULL,
`description` text,
`uk_description` text NOT NULL,
`offer` varchar(100) DEFAULT NULL,
`review` varchar(255) DEFAULT NULL,
`video` text,
`video_title` varchar(100) DEFAULT NULL,
`videomobile` text,
`video2_title` varchar(100) DEFAULT NULL,
`video2` text,
`pricedrop` varchar(10) DEFAULT NULL,
`pricedropenable` varchar(5) DEFAULT NULL,
`producttype` varchar(20) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `title2` (`title`),
FULLTEXT KEY `title` (`title`),
FULLTEXT KEY `description` (`description`),
FULLTEXT KEY `title_2` (`title`)
) ENGINE=MyISAM AUTO_INCREMENT=1348 DEFAULT CHARSET=utf8[/text]

Re: How do I enter anad render Germany Characters: > ö <

Posted: Tue Apr 19, 2016 8:17 am
by requinix
The problem is with your webpages, right? Are you using phpMyAdmin to render your webpages? No, you are using PHP code. So you have to do the %char% query using PHP code.

Re: How do I enter anad render Germany Characters: > ö <

Posted: Tue Apr 19, 2016 8:20 am
by simonmlewis
Simple rendering a page with this?

Code: Select all

<?php
mysql_query("SHOW VARIABLES LIKE '%char%'");
?>
?

Re: How do I enter anad render Germany Characters: > ö <

Posted: Tue Apr 19, 2016 8:23 am
by simonmlewis
Well that's very strange.

I have a tool that renames the categories and subcategories. I resaved it as utf8. Then I ran the queries and it renamed them, and showed the characters correctly throughout!! Thought I had cracked it.

Then I ran a query to set them all to lowercase.

Code: Select all

UPDATE products SET title = LOWER(title);# 3 rows affected. UPDATE products SET catname = LOWER(catname);# 415 rows affected. UPDATE products SET subname = LOWER(subname);# 54 rows affected. 
This tho has put them all back to being bad, and I have all the diamonds back again!

Re: How do I enter anad render Germany Characters: > ö <

Posted: Tue Apr 19, 2016 8:47 am
by simonmlewis
Setting it to lowercase sets the field content for this particular word to:
[text]zubehã¶r[/text]
Then if I run an update and rename it (basically using the same text seen on screen), it changes the content in the field to this... which breaks it:
[text]zubehör[/text]
It's really confusing.

Re: How do I enter anad render Germany Characters: > ö <

Posted: Tue Apr 19, 2016 9:04 am
by simonmlewis
If I use this, to ensure new and editing categories are lowercase in the system, it creates a diamond:

Code: Select all

$subname = isset($_POST['subname']) ? $_POST['subname'] : null;
$subname = strtolower($subname);