using drupal 7.4
the latest modul dev version.
i trie to change the content type of the printer-friendly site.
if i have a look (several "tools") with.. something like
http://web-sniffer.net/ it shows that the printer-page
is having a content-type: iso - ....
i will have there a content-type: utf-8 ..
i tried to change in my subtheme of zen (in a folder "sites/all/themes/mysubtheme/..."
tried "print.tpl.ph" ... tried with htaccess to get the content-type utf-8 ...
my hosting service i use is on a shared server, normally they have iso.
some hours..
i am not a coder, but with some time i will understand some little code elements
but i am not a programmer :)
so... where can i change "something" to get "utf-8" when clicking
on "sitename/?q=print/url-alias or node/xx"
mail will send it in utf-8
?? dont know what to do..
Comments
Comment #1
kifuzzy CreditAttribution: kifuzzy commenteddatqabase is in utf8_generall_ci
edit:
tried in print-tpl.php in "sites/all/modules/print" something..
edit:
a page with "domain.xy/?q=alias" has the content - type "utf-8"
but when clicking "...=print/alias.. " the printer friendly page appears in "iso.."
edit:
uploaded a fresh installation (relative) of drupal 7.4
with wysiwyg and ckedtior librarie and some other
modules..
still the same.. but, when "flash all caches" .. it
shows the correct (an "ö" where an "ö" should be)
but some clicks later.. broken again.
tried
"AddDefaultCharset Off" in root-drupal .htaccess
"AddDefaultCharset utf-8 " but not working
the printer-friendly page is delivered in iso-... but not in utf-8.. content type
edit:
trying "boost" http://drupal.org/project/boost has no effects
Comment #2
kifuzzy CreditAttribution: kifuzzy commentedComment #3
kifuzzy CreditAttribution: kifuzzy commentedok - whatever i do - if clicking on "printer friedndly version" ..
firefox, internet explorer, chrome, safari for windows
are switching to - iso character set for the site and not utf-8
Comment #4
jcnventura CreditAttribution: jcnventura commentedIn my test-site: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
This comes from Drupal itself.
If your site has something different there, something is changing it. If you're talking about something else, please specify where you find this "iso-".
Comment #5
kifuzzy CreditAttribution: kifuzzy commentedhttp://test.mydomain.de/?q=print/3
with
one example
http-request-header
http-version:http1.1 / request-type: get
with HTTP Response Header
the page before, where the link to the printer-friendly is in the
link-section of node (page) at the bottom of - gives a "utf-8"
as "content-type",
the browsers switch to site-encoding "... iso..."
when clicking on this link - i could change it bymyself when i go over the
browser-menu and select the encoding "utf-8" by hand.
some of the output of the website, sourcecode of the
"printer-friendly-page" which switch to "iso-encoding"
in browsers
it is a test-installation with
some ... :
its like that also in a zen-subtheme with a fully site online-ready and
some more modules or libraries.
or like in a basic drupal 7.4 installation with only some "article" and the
"print" module.
hmmm
think, its the server of my hoster?
try to change with print.tpl.php in the print-folder
try with .htaccess in the drupal-root
try with some "boost" - modul things in .htaccess
..
drupal make something i can not reproduce
every browser, when i click on the link
switch to "iso".
thx for your attention! :-)
greetings from germany
edit#
a includes/common.inc file looks like this
http://api.drupal.org/api/drupal/includes--common.inc/function/_drupal_d...
i tried something like
http://www.metaltoad.com/blog/how-change-content-type-meta-tag-drupal
but - i am not a coder... where to place?
i tried some.. but nothing works, happens..
Comment #6
jcnventura CreditAttribution: jcnventura commentedYou shouldn't have to tinker with that..
Those change the meta flag, which as you can see in the example you provided is correctly set to utf-8.
The problem here is the http header.
I expect that the Drupal bootstrap process calls:
drupal_set_header('Content-Type: text/html; charset=utf-8');
As it should during _drupal_bootstrap_full(). I need to check that this is being properly done.
Comment #7
kifuzzy CreditAttribution: kifuzzy commentedi do not really understand what this means for me
or where to have look in which files.
or did you mean "during _drupal_bootstrap_full()." .. you have to look
somewhere in your files to reproduce or something like..?
drupal should deliver me the site in utf-8
like the nodes / pages i have - but it do not
deliver it when call the print.
do you mean "i (me) have to look" or do you will have a look?
do you need information?
sorry, i am a little confused.. one at the moment
Comment #8
jcnventura CreditAttribution: jcnventura commentedYes, I plan to take a look at it..
As I see it, when you call a drupal page, the bootstrap process begins and allows you to call modules. My code is executed because of that. During that bootstrap, the above line is called and should set the HTTP header to content-type utf-8.
After onfirming from your info that the meta data in the HTML is utf-8, it must be the http header that is setting it as iso.. Or else, it's something external to Drupal.
Comment #9
kifuzzy CreditAttribution: kifuzzy commentedyes :-) .. if i understand .. i am thinking about .. where to change the
header information or how to this information when
clicking on it.
so we will see :-) .. i take it from the page only visible for
admin or roles have right to see the "print-click-link"
.. so, the print_mail works fine.
i do not have tried the pdf - functionality, cause
i have to setup things for that in a virtual server
i have somewhere - but not really time.
i have some installation, or a test-area for me and my things
with only a maximum of 64 MB on a shared server - on other
installations .. others are "production" .. i do not test soemthing
there.
thank you!
thinking about the header, yes.
edit:
or .. something external to drupal
Comment #10
jcnventura CreditAttribution: jcnventura commentedIt seems that the bootstrap process no longer sends the HTTP header in D7. I've added the necessary call to the print module.
Comment #11
kifuzzy CreditAttribution: kifuzzy commentedthank you - i will try it later and then change the status of this.
Comment #12
kifuzzy CreditAttribution: kifuzzy commentedwell done! and fast!
thank you very much indeed :-)
i tried the alpha-version of date 21.july.2011 and the header of
the printer-friendly-page ist now fine and the page is printer-friendly-ready :-)
Comment #13
lkrzak CreditAttribution: lkrzak commentedIs this issue really resolved? I've installed the 7.x-1.0-beta1 and when viewing the printer-friendly page the browser switches to ISO and my native language characters are broken. Switching it manually to UTF-8 makes the page readible.
Comment #14
OFF CreditAttribution: OFF commentedI have same problem with all versions of this module
Comment #15
mzwyssig CreditAttribution: mzwyssig commentedSame here ! Currently using v.7.x-1.1
Comment #16
jcnventura CreditAttribution: jcnventura commentedCan you provide a URL to the pages in question?
Comment #17
mzwyssig CreditAttribution: mzwyssig commentedSorry, just saw this thread : http://drupal.org/node/1658760.
EDIT: jcnventura, I just sent you an email with a link.
Closing again.