Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: iso-8859-2 coding

  1. #1
    Guest

    Default iso-8859-2 coding

    i've to use iso-8859-2 coding on my pages (pete.bizhat.com), but it doesn't seems to work (chars like ščřž looks strange). i think that the server doesn't support this coding. so admins can you add it? i know i can change coding (for example to windows-1250 coding) but this isn't suitable solution for me... thanks for reply.

  2. #2
    Join Date
    Sep 2003
    Posts
    3,040

    Default

    All characters look strange to me :D

    I don't think its anything to do with server. If you know HOW-TO regarding this, let me know.
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

  3. #3
    Guest

    Default

    so try to use w3c html validator. make a test page and declare there any charset (except iso-8859-1) and use special chars like +ěščřžý place it on server and test it (for example in internet explorer for windows). click right mouse button and hover on "coding" (i don't have english explorer) and choose automatic and as you can see it switched to "west-euro languages (iso)" but you declared for example utf-8 charset (so you have to corect it manually) and special chars (ěščřž...) looks different...

    now - validator. go to http://validator.w3.org/ and test your page (from server of course not from localhost) and you get the message similar ti this: "The character encoding specified in the HTTP header (iso-8859-1) is different from the value in the <meta> element (iso-8859-2). I will use the value from the HTTP header (iso-8859-1) for this validation." <- but i declared iso-8859-2 encoding. works same with utf-8 unicode and windows-1250 charset encoding. server simply overwrite declarations in html by its own declaration (server's declaration has higher "priority" then declaration in meta tag).

    i think that it could be fixed by adding support to system for those charsets (utf-8 unicode windows-1250 also known as "central european languages" in windows - iso-8859-2 also known as "central european languages (iso)" in windows).

  4. #4
    Guest

    Default

    i've just uploaded a test page to http://pete.bizhat.com/testpage/ when you can see how it's correct...

  5. #5
    Guest

    Default

    propably AddDefaultCharset is set to iso-8859-1 in file httpd.conf. that overrides declaration in meta tag. you can simply fix it by changing it to "AddDefaultCharset ISO-8859-2" (only in for my subdomain - forces sever to send pages from my subdomain in iso-8859-2 coding, even if their declaration is different) or better changing it to "AddDefaultCharset Off" (for whole server; in this case all users can declare their own coding in meta tag and server doesn't override it but accepts it).

    (some people thinks that this is not enough and they also using function "AddCharset" - example:
    "AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
    AddCharset windows-1250 .win-1250" but imho setting AddDefaultCharset to off is enough - you can test it on my testpage - previous post)

  6. #6
    Join Date
    Sep 2003
    Posts
    3,040

    Default

    We have following in httpd.conf

    AddDefaultCharset ISO-8859-1

    Is used if you don't specify one in your HTML.

    # Specify a default charset for all pages sent out. This is
    # always a good idea and opens the door for future internationalisation
    # of your web site, should you ever want it. Specifying it as
    # a default does little harm; as the standard dictates that a page
    # is in iso-8859-1 (latin1) unless specified otherwise i.e. you
    # are merely stating the obvious. There are also some security
    # reasons in browsers, related to javascript and URL parsing
    # which encourage you to always set a default char set.
    #
    AddDefaultCharset ISO-8859-1

    #
    # Commonly used filename extensions to character sets. You probably
    # want to avoid clashes with the language extensions, unless you
    # are good at carefully testing your setup after each change.
    # See http://www.iana.org/assignments/character-sets for the
    # official list of charset names and their respective RFCs.
    #
    AddCharset ISO-8859-1 .iso8859-1 .latin1
    AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
    AddCharset ISO-8859-3 .iso8859-3 .latin3
    AddCharset ISO-8859-4 .iso8859-4 .latin4
    AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru
    AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb
    AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk
    AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb
    AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk
    AddCharset ISO-2022-JP .iso2022-jp .jis
    AddCharset ISO-2022-KR .iso2022-kr .kis
    AddCharset ISO-2022-CN .iso2022-cn .cis
    AddCharset Big5 .Big5 .big5
    # For russian, more than one charset is used (depends on client, mostly):
    AddCharset WINDOWS-1251 .cp-1251 .win-1251
    AddCharset CP866 .cp866
    AddCharset KOI8-r .koi8-r .koi8-ru
    AddCharset KOI8-ru .koi8-uk .ua
    AddCharset ISO-10646-UCS-2 .ucs2
    AddCharset ISO-10646-UCS-4 .ucs4
    AddCharset UTF-8 .utf8

    # The set below does not map to a specific (iso) standard
    # but works on a fairly wide range of browsers. Note that
    # capitalization actually matters (it should not, but it
    # does for some browsers).
    #
    # See http://www.iana.org/assignments/character-sets
    # for a list of sorts. But browsers support few.
    #
    AddCharset GB2312 .gb2312 .gb
    AddCharset utf-7 .utf7
    AddCharset utf-8 .utf8
    AddCharset big5 .big5 .b5
    AddCharset EUC-TW .euc-tw
    AddCharset EUC-JP .euc-jp
    AddCharset EUC-KR .euc-kr
    AddCharset shift_jis .sjis
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

  7. #7
    Guest

    Default

    "Is used if you don't specify one in your HTML"
    but i specified it and server always returns me page coded in iso-8859-1 - tested in mozilla firefox msie 6 and opera (with utf-8 unicode iso-8859-2 and windows-1250).

    i specified it by this line
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">

  8. #8
    Guest

  9. #9
    Guest

    Default

    addition to previous post: there you can read that:

    "AddDefaultCharset directive
    Syntax: AddDefaultCharset On|Off|charset
    Context: all
    Status: core
    Default: AddDefaultCharset Off
    Compatibility: AddDefaultCharset is only available in Apache 1.3.12 and later
    This directive specifies the name of the character set that will be added to any response that does not have any parameter on the content type in the HTTP headers. This will override any character set specified in the body of the document via a META tag. A setting of AddDefaultCharset Off disables this functionality. AddDefaultCharset On enables Apache's internal default charset of iso-8859-1 as required by the directive. You can also specify an alternate charset to be used.

    For example:

    AddDefaultCharset utf-8
    Note: This will not have any effect on the Content-Type and character set for default Apache-generated status pages (such as '404 Not Found' or '301 Moved Permanently') because those have an actual character set (that in which the hard-coded page content is written) and don't need to have a default applied."

    so you can simply put the AddDefaultCharset On to httpd.conf file and it won't crash the server. it will work the same, but it will fix this problem. i have found another user who has got same problem as me - http://forums.bizhat.com/ftopic2175.html

    (if you afraid of this setting, could you simply change it for a while and test some random subdomains.)

  10. #10
    Join Date
    Sep 2003
    Posts
    3,040

    Default

    Now AddDefaultCharset is Off.

    Try it, i really don't know the difference as i only use English and can't understand other languages. English work fine by default. So check it yourself and let me know.

    #AddDefaultCharset ISO-8859-1
    AddDefaultCharset Off
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •