Jump to content
TNG Community

Gendex display problem


BigBob

Recommended Posts

Hi,

When I search in Gendex http://tngnetwork.lythgoes.net/ the name PARADIS with nosurname

I got strange surnames like PARADIS, Ad�la�de

I know (it's on my database) that it's because the french name "Adélaïde" have special character

It's not very surprising because it's append frequently with french special character àèêï etc...

What is very surprising is when you go to page 2 and back to page 1 everything is ok ????

The search is working correctly.

If I search for name PARADIS surname "Adélaïde" I got the good result but wrong display (but this time no chance to redisplay correctly :cry:

Any idea?

Robert

Link to comment
Share on other sites

  • 2 years later...
Réal Charlebois

I'm having the exact same problem and I suspect it has to do with UTF-8. I'm also looking for a solution.

I found the solution (in my case anyway). It was related to UTF-8 and I had to make the following changes to the code:

TNG Version v.7.0.1

In adminlib.php modify the initials function as follows:

function initials( $name ) {

$newname = "";

if($session_charset = "UTF-8") $name = utf8_decode($name);

$token = strtok( $name, " " );

do{

if( substr( $token, 0, 1 ) != "(" ) //In case there is a name in brackets, in which case ignore

if($session_charset = "UTF-8")

$newname .= utf8_encode(substr( $token, 0, 1 )) . ".";

else

$newname .= substr( $token, 0, 1 ) . ".";

$token = strtok(" ");

}

while( $token != "" );

return ereg_replace("\"", """,$newname);

}

Before line 165 in secondary.php insert the following line 164

164: if($session_charset = "UTF-8") $line = utf8_decode($line);

165: fwrite( $fp2, "$line" );

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...