Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
utf-8 for NF0
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Support

2019-08-25 16:55:41
hi

need your help for encoding the NFO
my header and all my SQL tables in utf-8


at the edition of my NF0 all the accents works but on toretns-details he puts me sybole instead of my accents?
(é,è,ê,à,...etc)

a good Samaritan to a solution?

thanks ;)
Unknown User
2019-08-27 17:00:14
dont know if this will help but since you haven't had  a reply

Before proceeding, ensure that you: Have completed a full database backup!
Step 1: Database Level Changes

  • Identifying the Collation and Character set of your database
    SELECT DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME FROM
    information_schema.SCHEMATA S
    WHERE schema_name = 'your_database_name'
    AND
    (DEFAULT_CHARACTER_SET_NAME != 'utf8'
       OR
    DEFAULT_COLLATION_NAME not like 'utf8%');

  • Fixing the collation for the database

    ALTER DATABASE databasename CHARACTER SET utf8 COLLATE utf8_unicode_ci;


[/code]
Step 2: Table Level Changes

  • Identifying Database Tables with the incorrect character set or collation

    SELECT CONCAT(
    'ALTER TABLE ',  table_name, ' CHARACTER SET utf8 COLLATE utf8_general_ci;  ',
    'ALTER TABLE ',  table_name, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;  ')
    FROM information_schema.TABLES AS T, information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` AS C
    WHERE C.collation_name = T.table_collation
    AND T.table_schema = 'your_database_name'
    AND
    (C.CHARACTER_SET_NAME != 'utf8'
       OR
    C.COLLATION_NAME not like 'utf8%')

  • Adjusting table columns' collation and character set

Capture upper sql output and run it. (like following)

ALTER TABLE rma CHARACTER SET utf8 COLLATE utf8_general_ci;ALTER TABLE rma CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE rma_history CHARACTER SET utf8 COLLATE utf8_general_ci;ALTER TABLE rma_history CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE rma_products CHARACTER SET utf8 COLLATE utf8_general_ci;ALTER TABLE rma_products CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE rma_report_period CHARACTER SET utf8 COLLATE utf8_general_ci;ALTER TABLE rma_report_period CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE rma_reservation CHARACTER SET utf8 COLLATE utf8_general_ci;ALTER TABLE rma_reservation CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE rma_supplier_return CHARACTER SET utf8 COLLATE utf8_general_ci;ALTER TABLE rma_supplier_return CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE rma_supplier_return_history CHARACTER SET utf8 COLLATE utf8_general_ci;ALTER TABLE rma_supplier_return_history CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE rma_supplier_return_product CHARACTER SET utf8 COLLATE utf8_general_ci;ALTER TABLE rma_supplier_return_product CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

refer to: https://confluence.atlassian.com/display/CONFKB/How+to+Fix+the+Collation+and+Character+Set+of+a+MySQL+Database

as for you're nfo and header use your text editor and save in utf-8
2019-08-28 01:01:55
Thanks ?

my bdd is at utf8_general_ci and my roster has utf8_bin

I always like it but it works more on the nfo
I will still follow your protocol, nothing to lose saw I have a lot of backup fact. (y)

yes I thought for the header line but it does not work or the reason for your help :giggle:
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $site_config["CHARSET"]; ?>" xml:lang="fr"/>
or
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
2019-09-07 15:23:38
Hello

after doing the procedure and a correction on the nfo file, i finally reissue.


In [color=rgb(251, 160, 38)]torrents-details [/color]search :

//DISPLAY NFO BLOCK
if($row["nfo"]== "yes"){
   $nfofilelocation = "$nfo_dir/$row[id].nfo";
   $filegetcontents = file_get_contents($nfofilelocation);
   $nfo = htmlspecialchars($filegetcontents);
       if ($nfo) {  
           $nfo = my_nfo_translate($nfo);
           echo "<br /><center><b>NFO &#x21b4;</b></center><br />";
           print("<center><textarea class='nfo' style='width:99%;height:100%;' rows='20' cols='20' readonly='readonly'>".stripslashes($nfo)."</textarea></center>");
       }else{
           print(T_("ERROR")." reading .nfo file!");
       }
}


Replace with :

//DISPLAY NFO BLOCK
if($row["nfo"]== "yes"){
   $nfofilelocation = "$nfo_dir/$row[id].nfo";
   $filegetcontents = file_get_contents($nfofilelocation);
   $nfo = htmlspecialchars($filegetcontents);
       if ($nfo) {  
           $nfo = my_nfo_translate($nfo);
if (get_user_class() >= 4) {          
   echo "<a class='stylebouton' href='nfo-view.php?id=".$row["id"]."' target='_blank'>".T_("VIEW_CURRENT_NFO")."</a>";          
}      
           echo "<meta http-equiv='Content-Type' content='text/html; charset=utf-8' /><br /><center><b>NFO &#x21b4;</b><br />";          
           print("<textarea class='nfo collapsible' style='width:96%;height:100%;' rows='20' cols='20' readonly='readonly'>".stripslashes($filegetcontents)."</textarea></center><br/>");
       }else{
           print(T_("ERROR")." Reading the .nfo file is not good! make sure that the encoding is in UTF-8 and that the file has the extension .nfo ");
       }
}    


In [color=rgb(251, 160, 38)]nfo-view [/color]search :

   if ($nfo) {
       $nfo = my_nfo_translate($nfo);
       if($CURUSER["edit_torrents"]=="yes")
           begin_frame(T_("NFO_FILE_FOR").": <a href='".$site_config["SITEURL"]."/torrents-details.php?id=$id'>$shortname</a> - <a href='nfo-edit.php?id=$id'>".T_("NFO_EDIT")."</a>");
       else
           begin_frame(T_("NFO_FILE_FOR").": $shortname");

       print("<textarea class='nfo' style=\"width:98%;height:100%;\" rows='50' cols='20' readonly='readonly'>".stripslashes($nfo)."</textarea>");

       end_frame();
   }

}//has nfo



Replace with :

   if ($nfo) {
       $nfo = my_nfo_translate($nfo);
       if($CURUSER["edit_torrents"]=="yes")
           begin_frame("<a href='".$site_config["SITEURL"]."/torrents-details.php?id=$id'><font size='3'>".$shortname."</font></a>");
       else
           begin_frame("$shortname");
       // .stripslashes($nfo)." // < souvegarde plus valide pour la v3
       print('<textarea class="nfo" name="content" cols="210" rows="40">'.$filegetcontents.'</textarea><br />');
       print("<br/><center><a class='stylebouton' href='nfo-edit.php?id=$id'>".T_("NFO_EDIT")."</a></center>");
       end_frame();
   }

}//has nfo


Thanks you[b][USER=1398] serph[/USER] ![/b]
Unknown User
2019-11-12 13:57:39
Hi,

Small problem?
[ATTACH]5237[/ATTACH]
nfo-error.png
nfo-error.png
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728