Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
utf-8 salje header?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
nel`chee



Joined: 08 Jul 2004
Posts: 2087
Location: Rijeka

PostPosted: 02.04.2005 21:07    Post subject: utf-8 salje header? Add user to your forum ignore list Reply with quote

eto upravo sam shvatila da header() funkcija javlja error ako dokument koristi utf-8 encoding. pa dobro, ako taj utf-8 stvara tolike probleme, zasto je onda tako dobar?? Confused

_________________
art & design portfoliofree Photoshop brushes stuffsketchblogfacebook
Back to top
View user's profile Send private message Visit poster's website Twitter profile
sime
Guest





PostPosted: 03.04.2005 00:10    Post subject: Reply with quote

?! Malo specifiraj u čemu je zapravo problem...

Code:

<?php
 header('content-type:text/html;charset=utf-8');
 header('content-language:en');
 ...
?>
Back to top
nel`chee



Joined: 08 Jul 2004
Posts: 2087
Location: Rijeka

PostPosted: 03.04.2005 10:01    Post subject: Add user to your forum ignore list Reply with quote

ako je sam dokument pisan u utf-8, dakle ima na pocetku dokumenta neke nevidljive znakice, header funkcija ne radi.
ako je u ansi, sve je okej. hm?

_________________
art & design portfoliofree Photoshop brushes stuffsketchblogfacebook
Back to top
View user's profile Send private message Visit poster's website Twitter profile
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 04.04.2005 15:46    Post subject: Add user to your forum ignore list Reply with quote

hm ovo je moj content negotiation, koristim utf-8 otkad znam za njega i nemam problema sa ikakvim headerima

Code:
/* content negotiation with browser */
if(stristr($_SERVER['HTTP_ACCEPT'],'application/xhtml+xml')){
   header('Content-Type: application/xhtml+xml;  charset=UTF-8');
   echo('<?xml version="1.0" encoding="UTF-8" ?>'."\n");
   echo('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">');
} else {
   header('Content-Type: text/html;  charset=UTF-8');
   echo('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">');
}


mislim da radiš nešto krivo ili ti editor nije dobar... poznato je da neki stariji ultraedit napravi neko smeće kod utf-8 fajlova na početku kad editira preko ftp-a
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sime
Guest





PostPosted: 04.04.2005 17:52    Post subject: Reply with quote

Nemoj da ti editor zapiše BOM na početak fajla, već nek ti samo enkodira sami tekst kao utf-8.
Back to top
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 04.04.2005 18:35    Post subject: Add user to your forum ignore list Reply with quote

vidiš, miniml se odlično sjetio, vjerojatno je BOM

nelči, koji editor koristiš?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nel`chee



Joined: 08 Jul 2004
Posts: 2087
Location: Rijeka

PostPosted: 04.04.2005 21:05    Post subject: Add user to your forum ignore list Reply with quote

koristila sam prije HomeSite+, sad radim u programmers notepad 2 i me likes very much, a svaki put sam u properties namjestala utf-8 jer sam mislila da tako treba Embarassed
well thanks, bez toga radi dzast fajn Mr. Green

_________________
art & design portfoliofree Photoshop brushes stuffsketchblogfacebook
Back to top
View user's profile Send private message Visit poster's website Twitter profile
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group