|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 (permalink) |
|
Messages: n/a
Hébergeur: |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160 hi all, i've Smarty-2.6.11 + PHP 5.1.1 + Apache 2.3.0-dev installed on OSX 10.4.3. getting my site up just fine, to date. one annoyance is driving me nuts though ... i've got some "errant" characters showing up in my browser-display ... and in my generated page source. e.g., in one case, my page-top template, ("doctype_header.tpl") is, simply: ======================== <!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=macintosh" /> ======================== but, after generation, i'm seeing the following characters DISPLAYED at the top of my browser page display:   and the generated source is: ======================== Ôªø Ôªø <!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=macintosh" /> ======================== NOTE, those first two lines of #^%$ ... this smells line an encoding issue, but for the lif o' me, i can't figure out where to look for / fix this. suggestions? thanks! richard - -- /"\ \ / ASCII Ribbon Campaign X against HTML email, vCards / \ & micro$oft attachments [GPG] OpenMacNews at gmail dot com fingerprint: 50C9 1C46 2F8F DE42 2EDB D460 95F7 DDBD 3671 08C6 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (Darwin) iEYEAREDAAYFAkO5+LcACgkQlffdvTZxCMYbGACfX8cRDxrcJi mv7aZbqQOoJhcc Yn0An27laHSpiUy48dg0dmUgMXTaqCAd =w381 -----END PGP SIGNATURE----- |
|
|
|
#2 (permalink) |
|
Messages: n/a
Hébergeur: |
Try this:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> Make sure you are using a plain text editor, not textedit. Mark On 1/2/06, OpenMacNews <openmacnews@gmail.com> wrote: > ======================== > <!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" > "http://www.w3.org/TR/html4/loose.dtd"> > <html lang="en"> > <head> > <meta http-equiv="content-type" content="text/html; charset=macintosh" /> > ======================== -- Have fun or die trying - but try not to actually die. http://www.AboveCalifornia.com Got Mac OS X? Get the AboveCalifornia Sherlock Channel: sherlock://www.AboveCalifornia.com/sherlock/SherlockChannel.xml?action=add |
|
|
|
#3 (permalink) |
|
Messages: n/a
Hébergeur: |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160 hi mark, thanks 4 the reply! Mark Wright wrote: > Try this: > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> > > Make sure you are using a plain text editor, not textedit. using that encoding CHANGES the characters, but does not eliminate them ... which makes me fairly _certain_ it's the encoding of some silly &^*&! file in my mess. i think a bulk line-ending/encoding housecleaning of all my text file is in order ... now if i can just remember how to set them in shell! cheers, richard - -- /"\ \ / ASCII Ribbon Campaign X against HTML email, vCards / \ & micro$oft attachments [GPG] OpenMacNews at gmail dot com fingerprint: 50C9 1C46 2F8F DE42 2EDB D460 95F7 DDBD 3671 08C6 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (Darwin) iEYEAREDAAYFAkO6DewACgkQlffdvTZxCMbeRACdFxsJ47bKl5 CWtEr+sGSpRyLQ 2JgAn11ffSkI7k11Qtxo11OyWhl4UnmS =J7Ki -----END PGP SIGNATURE----- |
|
|
|
#4 (permalink) |
|
Messages: n/a
Hébergeur: |
* OpenMacNews <openmacnews@gmail.com>:
> hi mark, > > thanks 4 the reply! > > Mark Wright wrote: > > Try this: > > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> > > > > Make sure you are using a plain text editor, not textedit. > > using that encoding CHANGES the characters, but does not eliminate them ... which makes me > fairly _certain_ it's the encoding of some silly &^*&! file in my mess. > > i think a bulk line-ending/encoding housecleaning of all my text file is in order ... now if i > can just remember how to set them in shell! My last lesson had been: No whitespace before or after <?php ?>. p@rick -- state of mind Agentur für Kommunikation und Design Patrick Koetter Tel: 089 45227227 Echinger Strasse 3 Fax: 089 45227226 85386 Eching Web: http://www.state-of-mind.de |
|
|
|
#5 (permalink) |
|
Messages: n/a
Hébergeur: |
On Mon, Jan 02, 2006 at 08:08:24PM -0800, OpenMacNews wrote:
[...] > but, after generation, i'm seeing the following characters DISPLAYED at the top of my browser > page display: > >   > [...] what you see is a BOM (Byte Order Mark). see http://www.unicode.org/faq/utf_bom.html and configure your text editor to not write the BOM in front of any text file. neither php nor smarty like it. HTH messju |
|
|
|
#6 (permalink) |
|
Messages: n/a
Hébergeur: |
Patrick Ben Koetter wrote:
> * OpenMacNews <openmacnews@gmail.com>: > >>hi mark, >> >>thanks 4 the reply! >> >>Mark Wright wrote: >> >>>Try this: >>><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> >>> >>>Make sure you are using a plain text editor, not textedit. >> >>using that encoding CHANGES the characters, but does not eliminate them ... which makes me >>fairly _certain_ it's the encoding of some silly &^*&! file in my mess. >> >>i think a bulk line-ending/encoding housecleaning of all my text file is in order ... now if i >>can just remember how to set them in shell! > > > My last lesson had been: No whitespace before or after <?php ?>. better yet just drop the last ?> if there is no static text to output in the rest of the file... e.g. --------------------------------------------------- <?php phpinfo(); include "my_special_info.php" ?> --------------------------------------------------- becomes: --------------------------------------------------- <?php phpinfo(); include "my_special_info.php" --------------------------------------------------- no more trailing spaces issues at any rate :-) > > p@rick > |
|
|
|
#7 (permalink) |
|
Messages: n/a
Hébergeur: |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160 hi messju, messju mohr wrote: > On Mon, Jan 02, 2006 at 08:08:24PM -0800, OpenMacNews wrote: > [...] >> but, after generation, i'm seeing the following characters DISPLAYED at the top of my browser >> page display: >> >>   >> > [...] > > what you see is a BOM (Byte Order Mark). see > http://www.unicode.org/faq/utf_bom.html and configure your text editor > to not write the BOM in front of any text file. neither php nor smarty > like it. bingo. _one_ of my templates was typed as "UTF-8 with BOM" (i have *no* idea why/how!?). changing its type to be Western/Latin1 fixed the problem ... weird characters gone! thx! it would've been a *while* b4 i found that :-) cheers, richard - -- /"\ \ / ASCII Ribbon Campaign X against HTML email, vCards / \ & micro$oft attachments [GPG] OpenMacNews at gmail dot com fingerprint: 50C9 1C46 2F8F DE42 2EDB D460 95F7 DDBD 3671 08C6 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (Darwin) iEYEAREDAAYFAkO6sA0ACgkQlffdvTZxCMYIxwCeOz5JljSGxv 6CDbE2egAdtgD6 jUgAnAxgN+pII9BuFUX/xFaGtGTtXPkF =Ib47 -----END PGP SIGNATURE----- |
|
![]() |
| Outils de la discussion | |
|
|