This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Problems with latin characters
#1

Hello,
I'm becoming mad trying to integrate Commentics with an Italian site.
As soon as someone types an à, or an è,é,ì,ò,ù, the system cuts off the entire comment.
Could someone please tell to me how can I solve this problem?
Thank you very much, have a nice day.

Franco
Reply
#2

Hi, this looks like the same thing that is happening here: http://www.commentics.org/forum/showthread.php?tid=342

I believe it's an encoding conflict between the page and the system, so try the things in that thread. I still need to test a few things to say for certain. Making sure everything is using utf-8 encoding would probably fix the issue if that's the case.

I'm giving you three guesses...
Reply
#3

Hello Static, thank you very much for your quick answer.
I'm trying to integrate Commentics into a php site.
Here is my first code:
<?php
session_start();
ob_start();
include "header.php";
As you can see, it's at the very beginning of the page.
I put the rest of the code at the middle of the page, as you can see here: http://www.inmiamemoria.com/scatole-dei-...___105.php
Tomorrow I'll look at the system encoding characters, even if I've a very poor experience concerning this.
Thank you again for your help!

Reply
#4

Hi! Two I was worried.
1Big Grinisagreement of a character code
your site is "charset=iso-8859-1".
Commentics maked "UTF-8".
If it uses from a multi-byte,
it is necessary to coincide the character code.

There is 3 method.
1: Changes the character code of your homepage.
iso-8859-1 --> UTF-8 (And saves by UTF-8.)
2: Commentics's code UTF-8 -->iso-8859-1
http://www.commentics.org/forum/showthread.php?tid=345
3:does not care.
only a single byte, Commentics work fine.

And..
2: Base is used.
<head>.. <base href="******">...</head>
Is Anchor out of order?
Maybe,Your Site "Reply" don't work.

#########################################
##--- OPEN ---------------
# This case is ,using <base.. in <HEAD>...</HEAD>
# Fix anchor trouble (ex.#form)

comments/includes/functions/comments.php

#
### -------- FIND ---------------
#

$box .= "<a class='reply_enabled' href='" . CMTX_ANCHOR_FORM . "' title='" . CMTX_TITLE_REPLY . "' onclick='";

#
### ----- Replace With--------
#

$box .= "<a class='reply_enabled' href='" .
$_SERVER["REQUEST_URI"]
. CMTX_ANCHOR_FORM . "' title='" . CMTX_TITLE_REPLY . "' onclick='";

---------------------------------------------------
Commentics's Japanese Commentary Site
http://commentics.bbfriend.net/
*Sorry...I am not good at English.
---------------------------------------------------
Reply
#5

Sorry, but i have the same problem like franco66 and your workaround don´t helps.
sorry..
Reply
#6

Hello Utaka, thank you for your help.
Concerning the first solution you wrote, I cannot change the character code into my site. So I changed it (from utf-8 to latin1) into both mysql tables and includes/db/connect.php as you wrote into the thread you mentioned (2nd method).
I didn't understand what to do with the third method, unfortunately.
Yesterday I tried to put some code to change the àèéìòù with &agrave; &egrave; and so on, but I didn't find any way to make it to work.
I'm afraid that the problem concerns the file includes/htmLawed/htmLawed.php, but it's an ocean of code that I've never seen, and I'm not finding any useful information over the internet.
Reply
#7

Hi ! ichole and franco66.
MayBe ..
Your Dafault Mysql variables is,
Code:
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 ?


And Your PHP Version is 5.2.2 or less.

OK?

Commentics set to
In comments/includes/commentics.php Line 45,
"set names utf8" or mysql_set_charset('utf8')

mysql_set_charset is PHP Version 5.2.3 or more .

"set names utf8" is ...Change 3 variables (only)

Code:
character_set_client     | latin1 -- >utf8
character_set_connection | latin1 -- >utf8
character_set_database   | latin1
character_set_filesystem | binary
character_set_results    | latin1  -- >utf8
character_set_server     | latin1
character_set_system     | utf8

Client_CharacterSet does not change.

mysql_set_charset also sets Client_CharacterSet.

I think ,You have 3 method.

method 1:Your PHP Ver UP 5.2.3 or more .
method 2: Your Mysql Default Set Change latin1 -->utf8

/etc/my.conf [mysqld] add
[mysqld]
default-character-set=utf8
skip-character-set-client-handshake

method 3:Commentics's code UTF-8 -->iso-8859-1

method 1 is Best.
My Site is one site method 2. and ather Site is method 1.

---------------------------------------------------
Commentics's Japanese Commentary Site
http://commentics.bbfriend.net/
*Sorry...I am not good at English.
---------------------------------------------------
Reply
#8

Excuse me utaka. Into the thread you mentioned, did you say that I have to change the character code of every commentics file? Could you please confirm if I understood well?
And then, could you please tell to me where I have to write "latin1" and where I have to write "iso-8859-1" instead?
Thank you very much to everyone for the help (my english is poor too! :-D)
Reply
#9

Excuse me utaka,
I use a virtual server and I can't change nor the mysql and php, nor their parameters.
So I have to work with the third method, but I didn't understand well what I have to do.
Could you please write to me again your indications?
Thank you a lot!

Quote:method 1:Your PHP Ver UP 5.2.3 or more .
method 2: Your Mysql Default Set Change latin1 -->utf8

/etc/my.conf [mysqld] add
[mysqld]
default-character-set=utf8
skip-character-set-client-handshake

method 3:Commentics's code UTF-8 -->iso-8859-1

method 1 is Best.
My Site is one site method 2. and ather Site is method 1.

Reply
#10

Method3?

Quote:could you please tell to me where I have
Sorry ..
I use Free Soft, And Auto Replace.

In my case , to EUC-JP.
http://www.commentics.org/forum/showthread.php?tid=345

Please look for the free software of your country.
I used Davas ,
Oh! I Find English Version --> http://gimite.net/en/?Devas
-------------------------------
Your Case ..Probably

## UTF8 --> iso-8859-1. (Batch conversion By Davas or yourFree_Soft)
1: Caracter contained in file 'comments/** All File'

utf-8 -----> iso-8859-1
UTF-8 -----> iso-8859-1

2: comments/includes/db/connect.php

mysql_set_charset('utf8'); --> mysql_set_charset('latin1');

mysql_query("SET NAMES 'UTF8'"); --> mysql_query("SET NAMES 'latin1 '");

3: All Language File Save As iso-8859-1
comments/includes/language/***/*.txt
comments/includes/emails/***/user/***.txt
comments/includes/emails/***/admin/****.txt
comments/includes/words/**.txt
comments/includes/template/**.txt
--------------------------------------------------------------------------------

operation is not compensated.
I do not know iso-8859-1.
It is to here that I can advise.

However, there is value of enough to try... Good luck!

---------------------------------------------------
Commentics's Japanese Commentary Site
http://commentics.bbfriend.net/
*Sorry...I am not good at English.
---------------------------------------------------
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
23-Feb-2014, 06:13 PM
Last Post by jegranet
13-Sep-2013, 09:31 PM
Last Post by ichole
29-Sep-2011, 02:17 AM
Last Post by Lee
25-Aug-2010, 03:20 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)