Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 12-08-2014 05:39:05

dansmith490
Member
From: Barrow, Bury St Edmunds
Registered: 11-10-2008
Posts: 154
Website

Foreign Characters with UTF-8

Hi,
I am having trouble in both the admin, invoice printing and frontend on the website with foreign characters, the database is set to UTF8_general_ci and the html character set is UTF8, as so

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

I added the code of "default-character-set = utf8" to the database connection for inserting, which inserted the data correctly in to the database, yet this caused some very strange characters to appear before any &pound; and other areas of the website. The main one was this  and also appeared in areas that had no data just &nbsp; such as Â&nbsp;

I had to remove this code to stop the front end showing these symbols.

Is this common issue, I have read lots of people with the same issue of UTF8 and tried many solutions but nothing seems to match up correctly.

This is a very recent order:
Ä°stanbul Teknik Ãniversitesi
ATTN:
Ä°stanbul Teknik Ãniversitesi
Avrasya Yer Bilimleri Enstitüsü Maslak
Ä°stanbul, Turkey 34469

Any known solution for this?

Offline

 

#2 12-08-2014 10:05:40

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Foreign Characters with UTF-8

All your magic is going to happen in the xhtml_translate() function in {private}/core/CORE/CORE.php.  You'll see that's where strings are encoded and decoded for display.  You're going to have to make adjustments there based on your server's configuration in order to fully get UTF8 working right

This is assuming you've changed the charset headers in all the skins (top of all skin.php files in {public}/skins/*) used by Kryptronic software.  And also assuming you've changed the collation of your MySQL database to UTF8.


Nick Hendler

Offline

 

#3 07-01-2015 03:59:58

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Re: Foreign Characters with UTF-8

Will this issue be fixed in v9? We get corrupted orders from other EU countries like

Liev?n instead of Lievägen

I have noticed that the text is corrupted in the order emails, BOM view and in SagePay but if I go into System Dashboard > Store > Orders > Processing and view the order there the text is correct.


Simon

Offline

 

#4 07-01-2015 07:16:04

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Foreign Characters with UTF-8

It's more of an issue with the browser (mail client, etc) viewing the characters than the software or content itself.  In V9 we've gone to straight UTF-8 output to help alleviate this issue.


Nick Hendler

Offline

 

#5 10-13-2017 05:37:07

geraldz
Member
Registered: 09-27-2011
Posts: 251

Re: Foreign Characters with UTF-8

The W3 validator reports that both my V8 and V9 is "using windows-1252 instead of the declared encoding iso-8859-1" and that "Legacy encoding windows-1252 used. Documents should use UTF-8."

It appears that the encoding is specified in the http header on the Kryptronic server.

In the post above, you state that V9 has gone to UTF-8 as recommended by W3.org.  But it appears that the server character encoding is still ISO-8859-1?

Offline

 

#6 10-13-2017 08:44:26

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Foreign Characters with UTF-8

This post is two years old and contains outdated information.  You're on KMH, meaning the server and PHP are using ISO-8859-1.  K9 uses ISO-8859-1.  If UTF-8 input is introduced, it's encoded properly as ISO-8859-1.  Version 9.0.2 goes far and explicitly sets ISO-8859-1 as the charset for PHP and latin1 as the encoding for the database to ensure proper encoding on newer versions of PHP, which set no default (UTF-8).  The fact is that properly encoded ISO-8859-1 is the most portable and easiest to work with across all platforms.


Nick Hendler

Offline

 

Board footer