Get started with PHP-Fusion

Start a New Thread

Users Participated

  • Catzenjaeger
    Post made: 6
  • Falk
    Post made: 6
  • Wanabo
    Post made: 2

  1. PHP-Fusion Support Forums
  2. PHP-Fusion 9 Support
  3. Modifications and Requests

Character set/text problems

Post your modification and request questions for v9 here.

13 Replies 146 Views Last Updated on 11 days ago

Catzenjaeger


Senior Member

#1

Posted 14 days ago

I have the problem that I want to spend my figures in PDF format. Now that works, but the lyrics are all wrong. I have the problem that the output in PDF no special characters used. So I have to save my texts in the database without any special characters

Currently, this is in the database

1 x Display Stand (with arm) <br />
1 x Nameplate

The Br and other marks may not be present. How can I do that?

here i have pulish my problem but its german sorry
http://fpdf.de/forum/viewtopic.php?f=25&t=5239&...774#p17774

a answer was: Use the right character - chr (xx) always goes when you have the character code.
For example, With the font dump script.

but waht i have to do exactly? i dont undterstand that
Can anyone help?

here a image from my problem

Posts: 385

Joined: 04/01/2005

Falk


Super Admin

#2

Posted 13 days ago

Something goes wrong with the UTF8 conversion during the creation. Thats where focus should be.

Posts: 3662

Joined: 27/09/2005

Catzenjaeger


Senior Member

#3

Posted 13 days ago

hmn here the code from my form:

echo form_textarea("figure_description", $locale['figurelib/admin/figurelib.php_061'], $data['figure_description'], [
"type" => fusion_get_settings("tinymce_enabled"Wink ? "tinymce" : "html",
"tinymce" => fusion_get_settings("tinymce_enabled"Wink && iADMIN ? "advanced" : "simple",
"autosize" => false,
"required" => false,
"form_name" => "inputform"
]);

my database settings for this field is text and utf8_unicode_ci

here a example what stored in my database

&lt;strong&gt;Bonus: &lt;/strong&gt;Interview James Cameron Behind the Scenes / Trailer / Bilder-Galerie&lt;strong&gt;Tonformat: &lt;/strong&gt; Englisch, DTS HD 5.1 Master Audio; Spanisch, Dolby Digital 5.1 AC-3; Deutsch, DTS 5.1; Portugiesisch, Dolby Digital 5.1 AC-3; Englisch, Dolby Digital 2.0 Surround; Englisch, Dolby Digital 4.1; Französisch, DTS 5.1&lt;strong&gt;Sprachen (Audio): &lt;/strong&gt; Deutsch&lt;strong&gt;Enthaltene Untertitel: &lt;/strong&gt; Dänisch, Französisch, Norwegisch, Portugiesisch, Englisch für Hörgeschädigte, Niederländisch, Spanisch, Finnisch&lt;strong&gt;Bildformat: &lt;/strong&gt; 1.85:1&lt;strong&gt;Spieldauer: &lt;/strong&gt;157 Minuten&lt;strong&gt;Datenträger:&lt;/strong&gt; 1&lt;strong&gt; Altersfreigabe: &lt;/strong&gt;Ab 16 Jahren


completly sh...
what can i do? i need a clean text so that i can make PDF

Posts: 385

Joined: 04/01/2005

Falk


Super Admin

#4

Posted 13 days ago

It is your PDF converter script you need to do something about

Posts: 3662

Joined: 27/09/2005

Catzenjaeger


Senior Member

#5

Posted 13 days ago

no no no this all makes php fusion 9
But I need a pure text to prepare the output of the text as PDF

Posts: 385

Joined: 04/01/2005

Falk


Super Admin

#6

Posted 13 days ago

If you have normal chars displayed on your site but get scramlaed chars after PDF convertion it is the script that scrambles them, or are you saying that it is scrambled on site as well?, if that is the case you need to have utf-8 in your locale, in your file format ( saved locales and php files as utf-8 no bom) and in your database. That is the only way to solve it properly.

Posts: 3662

Joined: 27/09/2005

Catzenjaeger


Senior Member

#7

Posted 13 days ago

No .... I give the texts stored in the database were then later than postprocessing. The data are already stored wrongly in phpfusion in my DB. I have posted up my code with which I am writing. In the database, everything comes with these special characters and is also stored so.

this is my form:
Code Gist: Download source  

echo form_textarea("figure_description", $locale['figurelib/admin/figurelib.php_061'], $data['figure_description'], [
"type" => fusion_get_settings("tinymce_enabled"Wink ? "tinymce" : "html",
"tinymce" => fusion_get_settings("tinymce_enabled"Wink && iADMIN ? "advanced" : "simple",
"autosize" => false,
"required" => false,
"form_name" => "inputform"
]);


and so comes the texts in my DB
&lt;strong&gt;Bonus: &lt;/strong&gt;Interview James Cameron Behind the Scenes / Trailer / Bilder-Galerie&lt;strong&gt;Tonformat: &lt;/strong&gt; Englisch, DTS HD 5.1 Master Audio; Spanisch, Dolby Digital 5.1 AC-3; Deutsch, DTS 5.1; Portugiesisch, Dolby Digital 5.1 AC-3; Englisch, Dolby Digital 2.0 Surround; Englisch, Dolby Digital 4.1; Französisch, DTS 5.1&lt;strong&gt;Sprachen (Audio): &lt;/strong&gt; Deutsch&lt;strong&gt;Enthaltene Untertitel: &lt;/strong&gt; Dänisch, Französisch, Norwegisch, Portugiesisch, Englisch für Hörgeschädigte, Niederländisch, Spanisch, Finnisch&lt;strong&gt;Bildformat: &lt;/strong&gt; 1.85:1&lt;strong&gt;Spieldauer: &lt;/strong&gt;157 Minuten&lt;strong&gt;Datenträger:&lt;/strong&gt; 1&lt;strong&gt; Altersfreigabe: &lt;/strong&gt;Ab 16 Jahren


i use not the tiny (most time i i have this tiny on off well he makes only problems in PHP F9. I use the internal text editor

Posts: 385

Joined: 04/01/2005

Falk


Super Admin

#8

Posted 13 days ago

Give me a link to an example, we do not have utf8 here atm, so can´t see anything.

Posts: 3662

Joined: 27/09/2005

Catzenjaeger


Senior Member

#9

Posted 13 days ago

send you a private message with passwort eg

for example go of submit figure in menu

my intention is to give out the collectiosn of users as pfd (myCollection in menu)

Posts: 385

Joined: 04/01/2005

Falk


Super Admin

#10

Posted 13 days ago

Place some broken figurine examples in her collection, I don´t wanna poke around and guess what will break. provide a clear example please.

Posts: 3662

Joined: 27/09/2005

Catzenjaeger


Senior Member

#11

Posted 13 days ago

ok other way
here my submit.php

when you fill the form (submit.php) and send it all date would be stored in my database.
Normaly the user copy and paste the discreption ot a figure and paste this in my form.
My form store this but with tags and german sonderzeichen eg.
This is my problem. better would a clean text without this all. My PDF Script what i use need clean texts to convert it to a pdf.
I have try some different things like replaces eg but ist doesent work correct. everytime i have "special chracter"

sorry i dont know how i can you give a better example. Or i have to find a other pssibility to convert text and datebase content to PDF.

Posts: 385

Joined: 04/01/2005

Wanabo


Senior Member

#12

Posted 13 days ago

Perhaps there is a mismatch between server settings (php.ini) and php-fusion. I solved this for php-fusion v7 with:

add on top of header.php first line after <?php
Code Gist: Download source  

header("Content-Type: text/html; charset=".$locale['charset'].""); 

If your charset is set right it will be UTF-8. Check your locale files.
pHp-Fusion.Org, mods to enhance php-fusion.
pHp-Fusion.Asia & pHp-Fusion.Fr & pHp-Fusion.Cn are available for a localized support community. Send PB for info.

Posts: 492

Joined: 06/02/2006

Falk


Super Admin

#13

Posted 12 days ago

It is enabled in 9, native,
Code Gist: Download source  

header("Content-Type: text/html; charset=".fusion_get_locale('charset')."");

But if that PDF conversion script are not 100% integrated but something you call, then Wanabo is correct, the header might help if you place it in that file. Nothing you attached here helps since you only attach data to site, nothing that are connected to the problematic conversion. Site looks fine to me?

Posts: 3662

Joined: 27/09/2005

Wanabo


Senior Member

#14

Posted 11 days ago

Check in php.ini for
Code Gist: Download source  

default_charset = "UTF-8"


It might be commented out or set to:
Code Gist: Download source  

default_charset = "ISO-8859-1"

pHp-Fusion.Org, mods to enhance php-fusion.
pHp-Fusion.Asia & pHp-Fusion.Fr & pHp-Fusion.Cn are available for a localized support community. Send PB for info.

Posts: 492

Joined: 06/02/2006

Jump to Forum:
9 users are online
0 member and 9 guests