This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > March 2005 > OT: Charset Question





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author OT: Charset Question
Kramerica Industries

2005-03-30, 6:50 pm

As far as charset goes, should I be using UTF8 or ISO-nnn or windowsnnn.

Logically I would think windows is proprietary and I don't use it...
So is it UTF or ISO ?

This question is in regard specifically to Hebrew, but it probably makes no
difference what language.

The one page I find http://www.w3.org/International/O-charset-lang.html says
use UTF-8 when possible but when I view source it's got charset=iso-8859-1.

Does any one have any thoughts on the subject.


TIA


Scott

2005-03-30, 6:50 pm

Kramerica Industries wrote:
> As far as charset goes, should I be using UTF8 or ISO-nnn or windowsnnn.
>
> Logically I would think windows is proprietary and I don't use it...
> So is it UTF or ISO ?
>
> This question is in regard specifically to Hebrew, but it probably makes no
> difference what language.
>
> The one page I find http://www.w3.org/International/O-charset-lang.html says
> use UTF-8 when possible but when I view source it's got charset=iso-8859-1.
>
> Does any one have any thoughts on the subject.
>
>
> TIA
>
>



You can set the document encoding in the preferences for DW. Go to your
preferences select new document, and then for default encoding select
utf-8. When you create new documents from that point on they will be
utf-8 encoded.

Personally I use utf-8.

s
Kramerica Industries

2005-03-30, 6:50 pm

Scott Thanks. But that doesn't answer my question. I need to know if I
should be using UTF or ISO. Not *how* to change the charset in my document.

"Scott" <scott.bishop@mac.com> wrote in message
news:d2eu1m$npv$1@forums.macromedia.com...
> Kramerica Industries wrote:
>
>
> You can set the document encoding in the preferences for DW. Go to your
> preferences select new document, and then for default encoding select
> utf-8. When you create new documents from that point on they will be
> utf-8 encoded.
>
> Personally I use utf-8.
>
> s



David Powers

2005-03-30, 11:15 pm

Kramerica Industries wrote:
> Scott Thanks. But that doesn't answer my question. I need to know if I
> should be using UTF or ISO. Not *how* to change the charset in my document.


A large part of the answer really depends on the configuration of the
web server on your site. The web is gradually moving towards using
UTF-8, which is the most common version of Unicode. If your host's web
server automatically serves up pages as UTF-8, that is the encoding you
should use. If it doesn't have a default characterset, you can use what
you like.

What's the difference between UTF-8 and Latin1 (iso-8859-1)? As far as
non-accented characters are concerned, they are identical. But if you
use accented characters (such as e acute, a circumflex, etc), they are
different. In iso-8859-1, they use just one byte, in UTF-8, they use 2
bytes. Get the wrong encoding, and you end up with a mess.

If you use English only, and never use accented characters, UTF-8 or
iso-8859-1 are interchangeable. If you use accented characters, you need
to use the encoding used by your server - particularly if you're using a
database. Versions of mysql prior to 4.1 do not support UTF-8.

It's a bit of a minefield, but it's getting better as time goes by.

--
David Powers
Author, "Foundation PHP 5 for Flash" (friends of ED)
Co-author "PHP Web Development with DW MX 2004" (Apress)
http://computerbookshelf.com
Kramerica Industries

2005-03-30, 11:15 pm

My server seems to be putting out the characters in ISO, I only questioned
myself because I have a script that is used by other sites (entirely out of
my control), particularly one site which has its page encoded in UTF. I
looked at that page and all I saw was question marks.
http://tarweb.com/wedreg/w_info.php (so I manually changed the charset to
ISO to see that it works) Which means to me they are NOT interchangeable.
(at least Hebrew)

As an aside - I question why that site is using the script if it doesn't
display properly.??

It works properly (or as I expect it) here
http://www.yiqv.org/cal/onyoursite.php
And this is the script
http://www.yiqv.org/cal/scripts/?fu...t=7&display=heb

So basically, if I understand correctly is that it's a function of the
server, and there is nothing I can do??



"David Powers" <dp@example.com> wrote in message
news:d2fb34$cak$1@forums.macromedia.com...
> Kramerica Industries wrote:
>
> A large part of the answer really depends on the configuration of the web
> server on your site. The web is gradually moving towards using UTF-8,
> which is the most common version of Unicode. If your host's web server
> automatically serves up pages as UTF-8, that is the encoding you should
> use. If it doesn't have a default characterset, you can use what you like.
>
> What's the difference between UTF-8 and Latin1 (iso-8859-1)? As far as
> non-accented characters are concerned, they are identical. But if you use
> accented characters (such as e acute, a circumflex, etc), they are
> different. In iso-8859-1, they use just one byte, in UTF-8, they use 2
> bytes. Get the wrong encoding, and you end up with a mess.
>
> If you use English only, and never use accented characters, UTF-8 or
> iso-8859-1 are interchangeable. If you use accented characters, you need
> to use the encoding used by your server - particularly if you're using a
> database. Versions of mysql prior to 4.1 do not support UTF-8.
>
> It's a bit of a minefield, but it's getting better as time goes by.
>
> --
> David Powers
> Author, "Foundation PHP 5 for Flash" (friends of ED)
> Co-author "PHP Web Development with DW MX 2004" (Apress)
> http://computerbookshelf.com



David Powers

2005-03-31, 6:26 pm

Kramerica Industries wrote:
> So basically, if I understand correctly is that it's a function of the
> server, and there is nothing I can do??


If you are using PHP, you can put this right at the very top of your
page, right before the Doctype and <html> tags:

<?php header('Content-Type: text/html; charset=ISO-8859-8-i'?>

That will then override the server's default charset.

--
David Powers
Author, "Foundation PHP 5 for Flash" (friends of ED)
Co-author "PHP Web Development with DW MX 2004" (Apress)
http://computerbookshelf.com
Kramerica Industries

2005-03-31, 6:31 pm

I have this on *my* pages as you can see if you view the source.

The problem is the script is being used by other sites and it is merely a
script (no doctype no html tag) so I have no control over what other sites
use for a charset.

Clearly the server is putting the code out in ISO not UTF.
I guess I'll have to find a workaround for those UTF people who use the
script.
Thanks.





"David Powers" <dp@example.com> wrote in message
news:d2guko$lmm$1@forums.macromedia.com...
> Kramerica Industries wrote:
>
> If you are using PHP, you can put this right at the very top of your page,
> right before the Doctype and <html> tags:
>
> <?php header('Content-Type: text/html; charset=ISO-8859-8-i'?>
>
> That will then override the server's default charset.
>
> --
> David Powers
> Author, "Foundation PHP 5 for Flash" (friends of ED)
> Co-author "PHP Web Development with DW MX 2004" (Apress)
> http://computerbookshelf.com



Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews